Serial communication between the Ardunio and Processing
This week’s lab focused on exploring the Arduino’s capability to communicate using a Serial connection. I was very excited to learn how to set up this kind of communication system as it opens up a whole new set of development possibilities. Being able to interface physical computing components with Processing (or Flash) is just downright awesome!
I started by setting up the basic board that was outlined in the lab. I used a potentiometer as I loaned my beloved force sensor to another student for a project.
Next I programmed the board to send out a byte of information every 10 miliseconds that corresponds to the value of the poteniometer. Once this was working in the Arduino’s Serial monitor I then moved onto Processing. I copied the default sketch, rand it and – voila! – instant graphical data representation!
Once I got the basic setup working I began to think about how I could adapt the techniques outlined in the lab to my midterm project. Without giving too much away just yet, our midterm uses six digital inputs and one (possibly two) servo motor outputs. I peeked ahead at next week’s lab and was able to cobble together an Arduino program and Processing sketch that handles this kind of communication. Once we get more into the project I will begin to document our progress and post code samples.
Entry filed under: Communications.