Triggered by a discussion on the forums, here’s a little demo of how to build your own “Poor Man’s Scope”:
I connected an LDR between AIO1 and ground, and played around with light levels during this screen shot. The last samples were all over the map because I inadvertently touched the LDR leads.
All you need to reproduce this experiment is: an LDR, a JeeNode, and the JeeMon runtime. Oh, and the Arduino IDE to compile and upload a sketch to the JeeNode.
Anyway, here is the sketch running on the JeeNode:
It does a lot more than I’ll be using here, since I’m only picking up and displaying the first analog value, i.e. AIO1 on the JeeNode.
- unpack the ZIP file, so you end up with a “JeeMon” executable
- create a directory called “JeeMon-rigs”
- in that directory, create a file called “application.tcl” (contents shown below)
- adjust the serial port of the JeeNode to your setup (look at the top of application.tcl)
- launch JeeMon, and you should get the real-time scope display shown above
Here is the application.tcl file, written in Tcl and using the built-in Tk GUI subsystem for visual display:
I’ve sprinkled some comments in the code. There are a fair number of pesky little details (as in all programming languages), but even without knowledge of Tcl/Tk you should be able to more or less see what’s going on.
There’s a lot one could improve or add to this thing. There always is. This is just a starting point.
But there you go: a Poor Man’s Scope in less than 100 lines of JeeNode sketch + JeeMon rig code. Fun!