Daniel and I have been experimenting connecting Txtzyme applications up to his newly acquired PlugComputer. Monday we demonstrated a cascade of signaling protocols to implement a beer bottle sensor.
The flow (of information, not beer) is as follows:
- PlugComputer sends Txtzyme program over USB
- Teensy interprets program, sends pulse request to sensor
- Parallax sensor, emits ultrasound, responds with PWM measurement
- Teensy translates pulse width to echo time, an ASCII integer
- PlugComputer relays echo time over SSH to display
- Javascope plots echo history, showing beer movement
The interesting thing here is that a two-line shell script running on the PlugComputer is in complete control of this computation once all the pipes are connected. The other important thing is that all the pipes are flow-controlled, meaning the shell script gets to be simple.