Skip to content

devel0/iot-arduino-scope

Repository files navigation

arduino-scope

simple oscilloscope opengl using arduino as adc input through usb serial

  • Arduino ADC to convert signal to digital, then serial
    • 115kbaud =~ 11.5kb/s ( need at least 2 byte for a freq detect, ie. max freq detectable about 11.5khz/2 )
  • C++ opengl program to display waveform

keys

  • space : pause display
  • v/V : decrease/increase vertical factor
  • h/H : decrease/increase horizontal factor
  • up/down : delta vertical
  • p : toggle point mode
  • t : toggle text info

flash arduino

  • pre: install arduino ide
  • open sketch arduino-scope/arduino-scope.ino and flash firmware
    • tools/board ( eg. arduino nano )
    • tools/port
    • sketch upload

debug and execution

  • pre: install vscode and suggested c++ extension asked when open the folder
code .
  • breakpoints works thanks to gdb debugger ( -g switch to gcc - see Makefile )
  • tune serial port in launch.json "args"
  • hit F5 to start

dev notes

  • an ethernet udp branch exists but no increase in freq rate because bottleneck still exists in ADC conversion

comparision

freq sine square
460hz img img
1.57khz img img
3.26khz img img
4.44khz N/A img

About

simple oscilloscope opengl using arduino as adc input through usb serial

Topics

Resources

License

Stars

Watchers

Forks