Printing data to a serial terminal is a useful debugging tool when developing embedded systems but often the data of interest is a continuous stream of numbers that is of little use displayed as text. For example, this might be data from a sensor or real-time statistics such as bandwidth performance. Serial Oscilloscope is a Windows application that plots comma-separated variables within any incoming serial steam as channels on a real-time oscilloscope. The application also functions as a basic serial terminal, received bytes are printed to the terminal and typed characters are transmitted. The project uses Michael Bernstein’s oscilloscope library to plot up to 9 channels on 3 different oscilloscope with view and trigger menus.
Serial Oscilloscope is compatible with any serial stream containing comma-separated values terminated by a new-line character (
"\r"). For example,
"11,22,33\r" will be interpreted as values 11, 22 and 33 for channels 1, 2 and 3 respectively. The serial stream can also include non numerical characters which will be ignored. For example,
"a=0.5,blue,x=3.14,t1t2t3,8\r\n" will be interpreted as values 0.5, 3.14, 123 and 8 for channels 1, 2, 3 and 4 respectively.
The open-source resources also include an Arduino sketch to send analogue input values over serial. In the video I use the Arduino and Serial Oscilloscope to plot data from an IR distance sensor, a triple-axis accelerometer and a microphone.