Building on last week's serial lab, this week took the same principles and applied them to multiple, rather than a single, serial data source. In this case we took a circuit containing two analog and one digital sensor, and sent the output to a Processing script.
Here's a picture of the circuit - as you can see, there are two analog inputs (the potentiometers) and one digital input (the push button). As was noted in the lab, this set of inputs represents the same inputs as a typical one button mouse.
As such, the inputs were used to control a circle on screen, with the push button turning the circle on and off. You can see this control at work in the video above.
After getting the script working with a streaming serial input, we then rewrote the arduino side to wait for a handshake before it started sending data. Once it received the handshake, it would send only one set of data, until it received a request for another set. This serial behavior can be seen in the video above.
As mentioned at the top of the lab, the principles put to work here are very similar to the ones from last week's lab, but simply expanded to allow for multiple inputs. This, in turn, allows us to use the Arduino's serial output in a far more versatile and productive manner.
Showing posts with label serial. Show all posts
Showing posts with label serial. Show all posts
Tuesday, October 27, 2009
Tuesday, October 20, 2009
Physical Computing Week Six Lab: Serial Output
Through no fault of ITP's, this week's lab was perhaps the most redundant task I've undertaken since starting the program. This is largely due to the fact that when I started working at Dolby Laboratories, my first sizable task was to write almost the entire software stack for serial communciation on the Dolby Digital Cinema system. As such, doing so in a basic manner on the arduino/processing platform ended up being pretty trivial. That being said, it was fun to see it working, and to discover that processing and Dolby use the same serial back end libraries - RXTX!
Because of my strong familiarity with the material, I designed a relatively simple circuit employing a potentiometer to send analog data over the serial port.
Doing a read on this data was also relatively straightforward, allowing it to be piped into a graph in processing, which can be seen above.
Yay! Serial communication!
Because of my strong familiarity with the material, I designed a relatively simple circuit employing a potentiometer to send analog data over the serial port.
Doing a read on this data was also relatively straightforward, allowing it to be piped into a graph in processing, which can be seen above.
Yay! Serial communication!
Subscribe to:
Posts (Atom)