Hi all,
For those who do not know me, I'm author of a serial communication library for arduino, known as SerPro, RPC-like, fast, small and useful when you don't want your data to be lost or corrupt.
This library (actually a set of C++ templates) was developed for my arduino oscope, but can be used on any project, and used as-is in both arduino and PC, provided you have a C++ compiler.
Some people have been asking me to write better examples on how to use it, so I decided to give it a quick shot at a very simple one yet powerful. The sketch (if you remove the not yet used PWM code) is 90 lines long.
I dedided to call it "Watch My Pins":
This is a GTK+ client for it. From this client you can control arduino pins in a very simple way (a more complex way is on the forge) and also watch your arduino digital inputs.
The top squares depict the logical level on each pin. Green means '1', white means '0'.
The other squares show the pin mode. Can be Output1 (black up arrow on white background), Output0 (white up arrow on black background), Input (black down arrow) and Input with pullup (black arrow with a plus sign). Clicking on the pin mode square with your right mouse button allows you to change the mode and output (1/0).
Next version will allow pins to be mapped to specific functions, like PWM.
But again, this is only a demo of SerPro.
You can find SerPro latest code here: GitHub - alvieboy/arduino-serpro at development
And source code for "Watch My Pins" here:
Sketch: http://alvarolopes.com/resources/watchmypins-sketch-0.1.tar.gz
UI (GTK): http://alvarolopes.com/resources/watchmypins-gtkui-0.1.tar.gz
Best,
Álvaro