Beer Sensor Shows Value of Flow Control

Ultrasound Sensor on PlugComputer

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
  • Uploaded image

    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.

    Comments

    Not to derail your project (which is cool and useful!) but did you find that beer somewhere around town recently? I love most of the Lagunitas occasional brews, but I haven't seen Lil' Sumpin' in coolers for a few months. (If you're a Lagunitas fan and you see "Hairy Eyeball," you gotta give it a try!) — spacewrench

    Our hosts at Backspace were having trouble with all their taps so I had to resort to bottled beer. Lil' Sumpin' was their recommendation. I was careful to orient the bottle when taking the picture. I'm glad someone noticed. — WardCunningham