https://www.instructables.com/id/Oscilloscope-Arduino-Processing/
Oscilloscope Arduino-Processing
97,092
134
69
Introduction: Oscilloscope Arduino-Processing
Oscilloscope is a device that allows us to see graphically the electrical signal.
If you want a cheap oscilloscope to learn what it is or to play with, follow the steps below:
Step 1: Have an Arduino Uno
The price of Arduino Uno is around $ 20 in internet stores.
Step 2: Install the Arduino IDE and TimerOne.h Library
- First, if you do not already have the Arduino IDE installed, install it from the site Arduino: click here
- 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 field , type "TimerOne".
- (Information about the library will appear )
- click over that text and the "Install" button will appear.
- click "Install"
- Restart the program
Step 3: Download Arduino Program and Upload It to Arduino
- Download and unzip the Arduino program from this link: (oscilloscope_arduino.ino)
- Connect the Arduino to the computer via USB port
- Run the Arduino IDE;
- Open the downloaded program "oscilloscope_arduino.ino"
- Adjust the COM port correctly (see picture)
- Upload the program to Arduino.
Step 4: Download the Oscilloscope Processing Program
- Download and unzip the Processing program to run on the computer. Choose the correct one below:
- - windows 32
- - windows 64
- - linux 32
- - linux 64
- Execute the Processing file (ex: Windows 64 bits => oscilloscope_4ch.exe)
- Obs: lib\ folder is important, do not delete it
Java 8 needs to be installed
Step 5: If Oscilloscope_4ch.exe Doesn't Work...
If oscilloscope_4ch.exe doesn't work for any reason:
- Install the Processing IDE.
- Download and unzip the Processing source oscilloscope program
- Run Processing IDE and open the oscilloscope source program
- Execute the program clicking on the triangle icon
Step 6: Configure Serial Port to Connect Oscilloscope Program With Arduino
- 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".
- In the "Configurar a serial" (Configure the Serial) box, click "select serial" until the COM where the Arduino is connected appears.(if it did not appear, click "refresh" to update)
- Click "select speed" until the speed 115200 appears.
- Click "off" to switch to "on"
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 will see appear a signal like the picture.
The out (~9) and (~10) are generated by the "Ger.Sinal" box:
(~9) is PWM of 10Hz (T = 100ms) with 25% ON.
(~10) is a square of period 2T (200ms)
- You can adjust the values on that box dragging the edge or clicking around the control.
Step 8: Tips
- Click "Trigger" at the Ch-0 (red) to stabilish the signals.
- To not read the signals of Ch-2 and Ch-3, click on the names "Ch-2" and Ch-3 ".
- To see the XY (Lissajous figures), click on the name "XYZ"
- To detect the frequencies, click on "detect freq."
- 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.
- To change the dial control value click between vertical lines or drag the edge indicated by the triangles. (see picture)
- There is so much more! Explore!
Step 9: Aplication: Detecting Flash Frequency
You can find out the frequency that the flashlight is blinking using a LDR and a resistor (see the picture)
Step 10: Application: Detecting RPM of Fan
To find out the RPM of a fan use the circuit with LDR, resistor and a flashlight (not blinking).
Using the frequency value shown by the oscilloscope, apply the formula of the picture.
Step 11: Application: Analysing the Remote Control Signal
You can see the IR signal from remote control using the phototransistor TIL78.
Make the circuit of the picture, then follow the steps bellow:
- Adjust "dt" to 2ms (see all signal) or 100us (see details)
- Turn ch-0 trigger ON
- Increase level of trigger tension
- Click "UMA" (one): oscilloscope will stay waitting for the signal
- Press any remote control key directing it to TIL-78
- Analyse the graphic
Step 12: Application: Testing Components or Devices
We can use the oscilloscope to test electronic components or devices.
In this example we will test the little joystick for Arduino.
- Make the circuit shown in the picture.
- Connect the oscilloscope program to Arduino (configuring the Serial Port box)
- Click on "fluxo" (flow) so the Arduino sends each point right after reading.
- Adjust "dt" to 100ms to have a slow reading.
- Turn off the "ch-3" clicking over the name
- Adjust "v/div" to 5 (pressing the "shift" key to adjust all channels simultaneously)
- Change the ch-0 to up, moving the little left triangle (pressing the "shift" key)
- Turn on the XYZ channel and drag the "v/div", adjusting it to fill the free space.
- Move the joystick to all directions and press the button some times.
- See the curves.
Step 13: Measure Resistors and Capacitors
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)
Step 14: Do You Want More Fun?
You can download the entire project directly from the GitHub site clicking here
Watch the video on Youtube (turn on closecaption and translate to english!)
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! ;)
18 People Made This Project!
- gtelzur made it!
- jainronak1991 made it!
- dbouknight made it!
- TayyarG made it!
- TayyarG made it!
- heiko.mellies made it!
- rajainayat made it!
- Afzal cassim made it!
- guyzo22 made it!
See 9 More
Recommendations
We have a be nice policy.
Please be positive and constructive.
69 Discussions
¡Fantástico!
Me tomó solo unos minutos ponerme en marcha. Muy complacido. Me
mantendrá ocupado durante el resto del bloqueo de COVID-19.
====
Fantastic!
It took me only few minutes to up and run. Very pleased. It will keep
me occupied for the rest of the COVID-19 lock-down.
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:
A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000007110b5db, pid=23664, tid=0x000000000000636c
#
# JRE version: Java(TM) SE Runtime Environment (8.0_261-b12) (build 1.8.0_261-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.261-b12 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [jSSC-2.8.dll+0xb5db]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
Anyone can help me with this?? Pls
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
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................
What is the maximum voltage can be measure using this ?
Hi,
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 :)
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/String.h:31,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Print.h:24,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Stream.h:25,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Client.h:22,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/ArduinoAPI.h:29,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:23,
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/String.h:31,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Print.h:24,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Stream.h:25,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Client.h:22,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/ArduinoAPI.h:29,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:23,
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/String.h:31,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Print.h:24,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Stream.h:25,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Client.h:22,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/ArduinoAPI.h:29,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:23,
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/String.h:31,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Print.h:24,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Stream.h:25,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Client.h:22,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/ArduinoAPI.h:29,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:23,
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/String.h:31,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Print.h:24,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Stream.h:25,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Client.h:22,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/ArduinoAPI.h:29,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:23,
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/String.h:31,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Print.h:24,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Stream.h:25,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Client.h:22,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/ArduinoAPI.h:29,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:23,
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/String.h:31,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Print.h:24,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Stream.h:25,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Client.h:22,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/ArduinoAPI.h:29,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:23,
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/String.h:31,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Print.h:24,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Stream.h:25,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Client.h:22,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/ArduinoAPI.h:29,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:23,
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/String.h:31,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Print.h:24,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Stream.h:25,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/Client.h:22,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/ArduinoAPI.h:29,
from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:23,
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
"Show verbose output during compilation"
option enabled in File -> Preferences.
RogerioBego çok teşekür ederim tam aradıgım proje harika çalışıyor.:)
geriye probları yapmak kaldı
Hello,
I want to use Arduino Nano board with the oscilloscope programs. Could
you please let me know the changes in pin numbers that had to be made
for the programs to run as intended
Thanks in acvance!
Great Project! Very useful! Thank you!
How much frequency of this Scope be obtained like 100MHz 200MHz or 300MHz
Is there some way I can connect this to line voltage using some type of isolator . works fine for digital signals
Hi . Thank you for making this project. I´m currently running at the mega board. I have started to focus on the ESP32 cip.
Is there any version working on the ESP32 platform ?
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\cores\arduino\Print.h:
In function 'write.constprop':
C:\Program
Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino\Print.h:55:5:
internal compiler error: Segmentation fault
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper.exe:
fatal error: C:\Program
Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc
returned 1 exit status
compilation terminated.
c:/program
files/windowsapps/arduinollc.arduinoide_1.8.21.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe:
error: lto-wrapper failed
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
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.