Oscilloscope Arduino-Processing - 14 Steps - Instructables
Oscilloscope Arduino-Processing - 14 Steps - Instructables
Oscilloscope Arduino-Processing
By RogerioBego (/member/RogerioBego/) in Circuits (/circuits/) > Arduino (/circuits/arduino/projects/) 100.916 139 69
Download Favorite
(https://content
auto=webp&frame=1&fit=bounds&md=fa3122fd06166172c8b1d3880c2196ce)
instructables com/ORIG/F0N/7TZS/J4G588IQ/F0N7TZSJ4G588IQ jpg?
If you want a cheap oscilloscope to learn what it is or to play with, follow the steps below:
(https://content
auto=webp&frame=1&fit=bounds&md=42c0487acfab58bdc9239a25e3de3694)
instructables com/ORIG/FC4/0VS3/J1QP7A0W/FC40VS3J1QP7A0W pn
1. First, if you do not already have the Arduino IDE installed, install it from the site Arduino: click
here (https://www.arduino.cc/en/Main/Software)
2. Install the "TimerOne.h" library for the Arduino IDE, following the steps bellow
In the Arduino program click on "Sketch" (see the picture)
"Include Library ..."
"Manage Libraries ..."
On the line "Type: 'all' Topic: 'all'" has a blank search eld , type "TimerOne".
(Information about the library will appear )
click over that text and the "Install" button will appear.
click "Install"
Restart the program
(https://cdn
auto=webp&frame=1&fit=bounds&md=c9445512dd4fce0205f173cbc26
instructables com/ORIG/FXC/0RAK/J1QP7ACQ/FXC0RAKJ1QP
1. Download and unzip the Arduino program from this link: (oscilloscope_arduino.ino)
(https://github.com/rogeriobego/oscilloscope-arduino-
processing/ les/1109314/oscilloscope_arduino.zip)
2. Connect the Arduino to the computer via USB port
3. Run the Arduino IDE;
4. Open the downloaded program "oscilloscope_arduino.ino"
5. Adjust the COM port correctly (see picture)
6. Upload the program to Arduino.
Add Tip V Ask Question | Comment Download
1. You already have the oscilloscope program running and the Arduino connected to the
computer by USB port. Now you have to connect to each other by "serial".
2. In the "Con gurar a serial" (Con gure the Serial) box, click "select serial" until the COM where
the Arduino is connected appears.(if it did not appear, click "refresh" to update)
3. Click "select speed" until the speed 115200 appears.
4. Click "o " to switch to "on"
5. If everything is correct, the oscilloscope will show the 4 channels [A0 (ch-0), A1 (ch-1), A2 (ch-
2) and A3 (ch-3)]
obs: if nothing is connected you will see a noise.
Step 7: Connect the Output (~10) to Input (A0) and (~9) to (A1)
With wires connect the Arduino's digital output (~10) to analog input (A0) and digital output
(~9) to input (A1).
You can adjust the values on that box dragging the edge or clicking around the control.
Step 8: Tips
(https://cdn
auto=webp&frame=1&fit=bounds&md=76623ab25b4eb7728712e4ca93bd6370)
instructables com/ORIG/FQF/R7DV/J1V7VXJ9/FQFR7DVJ1V7VXJ9 png? (https://content
auto=webp&frame=1&fit=bounds&md=01e2642d1f03d227751e332ad5230286)
instructables com/ORIG/FGR/5VBD/J20PH3M1/FGR5VBDJ20PH3M1 png?
1. Click "Trigger" at the Ch-0 (red) to stabilish the signals.
2. To not read the signals of Ch-2 and Ch-3, click on the names "Ch-2" and Ch-3 ".
3. To see the XY (Lissajous gures), click on the name "XYZ"
4. To detect the frequencies, click on "detect freq."
5. To measure voltage and time/frequency, click on "medir" (measure) of the desired channel
then click on a point on the graph and drag to the other desired point.
6. To change the dial control value click between vertical lines or drag the edge indicated by
the triangles. (see picture)
7. There is so much more! Explore!
Add Tip V Ask Question | Comment Download
(https://content
auto=webp&frame=1&fit=bounds&md=7855749e780d075f93af9f44f2cdd347)
instructables com/ORIG/FG3/3O3B/J26EY4MF/FG33O3BJ26EY4MF png?
You can nd out the frequency that the ashlight is blinking using a LDR and a resistor (see the
picture)
Add Tip V Ask Question | Comment Download
To nd out the RPM of a fan use the circuit with LDR, resistor and a ashlight (not blinking).
Using the frequency value shown by the oscilloscope, apply the formula of the picture.
Make the circuit of the picture, then follow the steps bellow:
The "medir res./cap." (measure res./cap.) box is for measuring values of resistors and capacitors,
but it will only work if you make the circuit of the picture.
That function has the hability to discover by itself if the component connected is a capacitor or a
resistor, and to choose the better result using 3 scales (low, middle or high values)
Please, let me know if you liked that project or if you had any trouble to follow the steps.
I will apreciate any help to develop that project. Programmers, users, curious, dreammers, etc..,
will be welcome! ;)
I Made It!
Recommendations
(/Neopixel-RGB-LED-Sword-Prop/) (/Building-a-Self-Driving-Boat-ArduPilot-Rover/)
7 8 770 19 8 1.9K
(/contest/handtools/) (/contest/modifyit/)
Add Tip
V Ask Question
| Post Comment
69 Discussions
Answer / Upvote
Hi.
I'm having some issues with the program. The demo and all the measurements of the program works
fine, but, for some reason, when I click "off" to turn the application on, it chashes. Furthermore, when
the apllication crashes and closes, a .log file is created in the native folder, and in this page it says:
Reply / Upvote
Hi there,
I try to get the data on my serial port, but when I do so only hieroglyphs appear. I matched the baud
rate of the serial monitor with the one in Serial-begin().
I'm using an XLR8 Board from Alorium which can be used as Arduino UNO but with even better
performance.
Is it possible to write the high frequency ADC data in the serial port with a high baud rate? I want to
read out the serial port with a python code.
Thank you for your help. I'm looking forward to reading your answer.
Marius
2 replies F
/1 (/member/suman.menon283/)
suman.menon283 (/member/suman.menon283/)
Question 9 months ago
Answer / Upvote
Hi, i was doing a experiment where i use a function generator to display a sin wave . but when i do
this, the negative half cycle of the wave clipped off . it happent to all the other wave. why it
happent???? should i add 2.5V to the signal from function generator????
what should i do to prevent clipping of the signal ????....plz help me..... i don't get a clear idea from the
previous comment ..... plz help me with this................
1 answer F
Answer / Upvote
What is the maximum voltage can be measure using this ?
1 answer F
I wanted to measure 0-5v volts from an external source to see its waveform and needed help to
understand the wiring to take such measurement. Do I connect positive of external source to analog
pins A(0-4) and negative of external to gnd of Arduino? Can you kindly tell me if I need to change
anything in the code to take such external measurements? Any other precautions to protect the uno?
Additionally, when you say 4 channel, does it mean I can use analog pins A0, A1, A2 and A3 to
connect to 4 different positive inputs from 4 different circuits? Also, the 4 negative terminals will all be
connected to gnd of Arduino board? Thanks a lot for helping me learn :)
Reply / Upvote
Dear Sir,
Is there ways to overcome problem with Arduino Nano Every. Below is the error message while
uploading the oscilloscope_arduino into Nano Every.
Arduino: 1.8.12 (Windows 10), Board: "Arduino Nano Every, ATMEGA328"
WARNING: library TimerOne-1.1.0 claims to run on avr architecture(s) and may be incompatible with
your current board which runs on megaavr architecture(s).
In file included from
D:\Sementara\oscilloscope_arduino\oscilloscope_arduino\oscilloscope_arduino.ino:30:0:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h: In member function 'void
TimerOne::initialize(long unsigned int)':
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:47:2: error: 'TCCR1B' was not
declared in this scope
TCCR1B = _BV(WGM13); // set mode as phase and frequency correct pwm, stop the timer
^~~~~~
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:47:2: note: suggested
alternative: 'TCB1'
TCCR1B = _BV(WGM13); // set mode as phase and frequency correct pwm, stop the timer
^~~~~~
TCB1
In file included from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-
atmel3.6.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-
arduino5\avr\include\avr\pgmspace.h:90,
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/C
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/A
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Ardu
from sketch\oscilloscope_arduino.ino.cpp:1:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:47:15: error: 'WGM13' was
not declared in this scope
TCCR1B = _BV(WGM13); // set mode as phase and frequency correct pwm, stop the timer
^
In file included from
D:\Sementara\oscilloscope_arduino\oscilloscope_arduino\oscilloscope_arduino.ino:30:0:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:48:2: error: 'TCCR1A' was not
declared in this scope
TCCR1A = 0; // clear control register A
^~~~~~
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:48:2: note: suggested
alternative: 'TCB1'
TCCR1A = 0; // clear control register A
^~~~~~
TCB1
In file included from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-
atmel3.6.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-
arduino5\avr\include\avr\pgmspace.h:90,
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/C
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/A
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Ardu
from sketch\oscilloscope_arduino.ino.cpp:1:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h: In member function 'void
TimerOne::setPeriod(long unsigned int)':
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:54:25: error: 'CS10' was not
declared in this scope
clockSelectBits = _BV(CS10);
^
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:54:25: note: suggested
alternative: 'B110'
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:58:25: error: 'CS11' was not
declared in this scope
clockSelectBits = _BV(CS11);
^
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:58:25: note: suggested
alternative: 'B111'
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:62:25: error: 'CS11' was not
declared in this scope
clockSelectBits = _BV(CS11) | _BV(CS10);
^
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:62:25: note: suggested
alternative: 'B111'
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:62:37: error: 'CS10' was not
declared in this scope
clockSelectBits = _BV(CS11) | _BV(CS10);
^
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:62:37: note: suggested
alternative: 'B110'
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:66:25: error: 'CS12' was not
declared in this scope
clockSelectBits = _BV(CS12);
^
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:70:25: error: 'CS12' was not
declared in this scope
clockSelectBits = _BV(CS12) | _BV(CS10);
^
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:70:37: error: 'CS10' was not
declared in this scope
clockSelectBits = _BV(CS12) | _BV(CS10);
^
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:70:37: note: suggested
alternative: 'B110'
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:73:25: error: 'CS12' was not
declared in this scope
clockSelectBits = _BV(CS12) | _BV(CS10);
^
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:73:37: error: 'CS10' was not
declared in this scope
clockSelectBits = _BV(CS12) | _BV(CS10);
^
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:73:37: note: suggested
alternative: 'B110'
In file included from
D:\Sementara\oscilloscope_arduino\oscilloscope_arduino\oscilloscope_arduino.ino:30:0:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:76:2: error: 'ICR1' was not
declared in this scope
ICR1 = pwmPeriod;
^~~~
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:76:2: note: suggested
alternative: 'TCB1'
ICR1 = pwmPeriod;
^~~~
TCB1
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:77:2: error: 'TCCR1B' was not
declared in this scope
TCCR1B = _BV(WGM13) | clockSelectBits;
^~~~~~
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:77:2: note: suggested
alternative: 'TCB1'
TCCR1B = _BV(WGM13) | clockSelectBits;
^~~~~~
TCB1
In file included from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-
atmel3.6.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-
arduino5\avr\include\avr\pgmspace.h:90,
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/C
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/A
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Ardu
from sketch\oscilloscope_arduino.ino.cpp:1:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:77:15: error: 'WGM13' was
not declared in this scope
TCCR1B = _BV(WGM13) | clockSelectBits;
^
In file included from
D:\Sementara\oscilloscope_arduino\oscilloscope_arduino\oscilloscope_arduino.ino:30:0:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h: In member function 'void
TimerOne::start()':
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:84:2: error: 'TCCR1B' was not
declared in this scope
TCCR1B = 0;
^~~~~~
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:84:2: note: suggested
alternative: 'TCB1'
TCCR1B = 0;
^~~~~~
TCB1
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:85:2: error: 'TCNT1' was not
declared in this scope
TCNT1 = 0; // TODO: does this cause an undesired interrupt?
^~~~~
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:85:2: note: suggested
alternative: 'TCB1'
TCNT1 = 0; // TODO: does this cause an undesired interrupt?
^~~~~
TCB1
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h: In member function 'void
TimerOne::stop()':
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:89:2: error: 'TCCR1B' was not
declared in this scope
TCCR1B = _BV(WGM13);
^~~~~~
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:89:2: note: suggested
alternative: 'TCB1'
TCCR1B = _BV(WGM13);
^~~~~~
TCB1
In file included from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-
atmel3.6.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-
arduino5\avr\include\avr\pgmspace.h:90,
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/C
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/A
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Ardu
from sketch\oscilloscope_arduino.ino.cpp:1:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:89:15: error: 'WGM13' was
not declared in this scope
TCCR1B = _BV(WGM13);
^
In file included from
D:\Sementara\oscilloscope_arduino\oscilloscope_arduino\oscilloscope_arduino.ino:30:0:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h: In member function 'void
TimerOne::resume()':
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:95:2: error: 'TCCR1B' was not
declared in this scope
TCCR1B = _BV(WGM13) | clockSelectBits;
^~~~~~
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:95:2: note: suggested
alternative: 'TCB1'
TCCR1B = _BV(WGM13) | clockSelectBits;
^~~~~~
TCB1
In file included from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-
atmel3.6.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-
arduino5\avr\include\avr\pgmspace.h:90,
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/C
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/A
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Ardu
from sketch\oscilloscope_arduino.ino.cpp:1:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:95:15: error: 'WGM13' was
not declared in this scope
TCCR1B = _BV(WGM13) | clockSelectBits;
^
In file included from
D:\Sementara\oscilloscope_arduino\oscilloscope_arduino\oscilloscope_arduino.ino:30:0:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h: In member function 'void
TimerOne::setPwmDuty(char, unsigned int)':
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:105:13: error:
'TIMER1_A_PIN' was not declared in this scope
if (pin == TIMER1_A_PIN) OCR1A = dutyCycle;
^~~~~~~~~~~~
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:105:13: note: suggested
alternative: 'TIMERA0'
if (pin == TIMER1_A_PIN) OCR1A = dutyCycle;
^~~~~~~~~~~~
TIMERA0
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:105:27: error: 'OCR1A' was
not declared in this scope
if (pin == TIMER1_A_PIN) OCR1A = dutyCycle;
^~~~~
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h: In member function 'void
TimerOne::pwm(char, unsigned int)':
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:114:13: error:
'TIMER1_A_PIN' was not declared in this scope
if (pin == TIMER1_A_PIN) { pinMode(TIMER1_A_PIN, OUTPUT); TCCR1A |= _BV(COM1A1); }
^~~~~~~~~~~~
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:114:13: note: suggested
alternative: 'TIMERA0'
if (pin == TIMER1_A_PIN) { pinMode(TIMER1_A_PIN, OUTPUT); TCCR1A |= _BV(COM1A1); }
^~~~~~~~~~~~
TIMERA0
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:114:60: error: 'TCCR1A' was
not declared in this scope
if (pin == TIMER1_A_PIN) { pinMode(TIMER1_A_PIN, OUTPUT); TCCR1A |= _BV(COM1A1); }
^~~~~~
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:114:60: note: suggested
alternative: 'TCB1'
if (pin == TIMER1_A_PIN) { pinMode(TIMER1_A_PIN, OUTPUT); TCCR1A |= _BV(COM1A1); }
^~~~~~
TCB1
In file included from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-
atmel3.6.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-
arduino5\avr\include\avr\pgmspace.h:90,
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/C
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/A
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Ardu
from sketch\oscilloscope_arduino.ino.cpp:1:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:114:74: error: 'COM1A1' was
not declared in this scope
if (pin == TIMER1_A_PIN) { pinMode(TIMER1_A_PIN, OUTPUT); TCCR1A |= _BV(COM1A1); }
^
In file included from
D:\Sementara\oscilloscope_arduino\oscilloscope_arduino\oscilloscope_arduino.ino:30:0:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:122:2: error: 'TCCR1B' was
not declared in this scope
TCCR1B = _BV(WGM13) | clockSelectBits;
^~~~~~
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:122:2: note: suggested
alternative: 'TCB1'
TCCR1B = _BV(WGM13) | clockSelectBits;
^~~~~~
TCB1
In file included from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-
atmel3.6.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-
arduino5\avr\include\avr\pgmspace.h:90,
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/C
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/A
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Ardu
from sketch\oscilloscope_arduino.ino.cpp:1:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:122:15: error: 'WGM13' was
not declared in this scope
TCCR1B = _BV(WGM13) | clockSelectBits;
^
In file included from
D:\Sementara\oscilloscope_arduino\oscilloscope_arduino\oscilloscope_arduino.ino:30:0:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h: In member function 'void
TimerOne::disablePwm(char)':
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:129:13: error:
'TIMER1_A_PIN' was not declared in this scope
if (pin == TIMER1_A_PIN) TCCR1A &= ~_BV(COM1A1);
^~~~~~~~~~~~
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:129:13: note: suggested
alternative: 'TIMERA0'
if (pin == TIMER1_A_PIN) TCCR1A &= ~_BV(COM1A1);
^~~~~~~~~~~~
TIMERA0
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:129:27: error: 'TCCR1A' was
not declared in this scope
if (pin == TIMER1_A_PIN) TCCR1A &= ~_BV(COM1A1);
^~~~~~
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:129:27: note: suggested
alternative: 'TCB1'
if (pin == TIMER1_A_PIN) TCCR1A &= ~_BV(COM1A1);
^~~~~~
TCB1
In file included from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-
atmel3.6.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-
arduino5\avr\include\avr\pgmspace.h:90,
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/C
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/A
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Ardu
from sketch\oscilloscope_arduino.ino.cpp:1:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:129:42: error: 'COM1A1' was
not declared in this scope
if (pin == TIMER1_A_PIN) TCCR1A &= ~_BV(COM1A1);
^
In file included from
D:\Sementara\oscilloscope_arduino\oscilloscope_arduino\oscilloscope_arduino.ino:30:0:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h: In member function 'void
TimerOne::attachInterrupt(void (*)())':
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:143:2: error: 'TIMSK1' was
not declared in this scope
TIMSK1 = _BV(TOIE1);
^~~~~~
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:143:2: note: suggested
alternative: 'TIMERB1'
TIMSK1 = _BV(TOIE1);
^~~~~~
TIMERB1
In file included from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-
atmel3.6.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\user\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-
arduino5\avr\include\avr\pgmspace.h:90,
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/S
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/C
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/A
from
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Ardu
from sketch\oscilloscope_arduino.ino.cpp:1:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:143:15: error: 'TOIE1' was not
declared in this scope
TIMSK1 = _BV(TOIE1);
^
In file included from
D:\Sementara\oscilloscope_arduino\oscilloscope_arduino\oscilloscope_arduino.ino:30:0:
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h: In member function 'void
TimerOne::detachInterrupt()':
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:150:2: error: 'TIMSK1' was
not declared in this scope
TIMSK1 = 0;
^~~~~~
C:\Users\User\Documents\Arduino\libraries\TimerOne-1.1.0/TimerOne.h:150:2: note: suggested
alternative: 'TIMERB1'
TIMSK1 = 0;
^~~~~~
TIMERB1
D:\Sementara\oscilloscope_arduino\oscilloscope_arduino\oscilloscope_arduino.ino: At global scope:
oscilloscope_arduino:34:35: error: 'ADPS2' was not declared in this scope
const unsigned char PS_16 = (1 << ADPS2);
^~~~~
oscilloscope_arduino:35:35: error: 'ADPS2' was not declared in this scope
const unsigned char PS_32 = (1 << ADPS2) | (1 << ADPS0);
^~~~~
oscilloscope_arduino:35:50: error: 'ADPS0' was not declared in this scope
const unsigned char PS_32 = (1 << ADPS2) | (1 << ADPS0);
^~~~~
D:\Sementara\oscilloscope_arduino\oscilloscope_arduino\oscilloscope_arduino.ino:35:50: note:
suggested alternative: 'ADC0'
const unsigned char PS_32 = (1 << ADPS2) | (1 << ADPS0);
^~~~~
ADC0
oscilloscope_arduino:36:35: error: 'ADPS2' was not declared in this scope
const unsigned char PS_64 = (1 << ADPS2) | (1 << ADPS1);
^~~~~
oscilloscope_arduino:36:50: error: 'ADPS1' was not declared in this scope
const unsigned char PS_64 = (1 << ADPS2) | (1 << ADPS1);
^~~~~
oscilloscope_arduino:37:36: error: 'ADPS2' was not declared in this scope
const unsigned char PS_128 = (1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0);
^~~~~
oscilloscope_arduino:37:51: error: 'ADPS1' was not declared in this scope
const unsigned char PS_128 = (1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0);
^~~~~
oscilloscope_arduino:37:66: error: 'ADPS0' was not declared in this scope
const unsigned char PS_128 = (1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0);
^~~~~
D:\Sementara\oscilloscope_arduino\oscilloscope_arduino\oscilloscope_arduino.ino:37:66: note:
suggested alternative: 'ADC0'
const unsigned char PS_128 = (1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0);
^~~~~
ADC0
oscilloscope_arduino:38:2: error: 'configurar' does not name a type
configurar no setup: ADC
^~~~~~~~~~
D:\Sementara\oscilloscope_arduino\oscilloscope_arduino\oscilloscope_arduino.ino: In function 'void
setup()':
oscilloscope_arduino:114:3: error: 'ADCSRA' was not declared in this scope
ADCSRA |= PS_16; // 16 prescaler
^~~~~~
D:\Sementara\oscilloscope_arduino\oscilloscope_arduino\oscilloscope_arduino.ino:114:3: note:
suggested alternative: 'ADC_t'
ADCSRA |= PS_16; // 16 prescaler
^~~~~~
ADC_t
D:\Sementara\oscilloscope_arduino\oscilloscope_arduino\oscilloscope_arduino.ino: In function 'void
printConfig()':
oscilloscope_arduino:470:46: error: 'pwmOn' was not declared in this scope
Serial.print(">? pwmOn="); Serial.println(pwmOn);
^~~~~
D:\Sementara\oscilloscope_arduino\oscilloscope_arduino\oscilloscope_arduino.ino:470:46: note:
suggested alternative: 'pwmPon'
Serial.print(">? pwmOn="); Serial.println(pwmOn);
^~~~~
pwmPon
exit status 1
'ADPS2' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Reply / Upvote
Great Project! Very useful! Thank you!
CarlosM466 (/member/CarlosM466/)
(/member/CarlosM466/)
Question 10 months ago on Introduction
Answer / Upvote
Thank you for your project. I have arduino.exe 1.8.9 installed on Windows 10. Could you, please, help
us with the arduino software?
When I try to upload the program oscilloscope_arduino to my arduino uno I get this message:
Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino/Genuino Uno"
C:\Program
Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cor
In function 'write.constprop':
C:\Program
Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cor
internal compiler error: Segmentation fault
compilation terminated.
c:/program
files/windowsapps/arduinollc.arduinoide_1.8.21.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gc
error: lto-wrapper failed
exit status 1
Error compiling for board Arduino/Genuino Uno.
Reply / Upvote
Hello. I'm trying to measure a 1Mhz Crystal Can and I'm getting some strange results. Could you tell
me what Settings I need so it measures correctly. The software isnt written in English.