Return to UWO History 9832B Interactive Exhibit Design Winter 2010
Communication between Computer and Arduino (3 Feb 2010)
Although the Arduino can be powered by a battery and built into a standalone exhibit, most designs involve a direct connection to a regular desktop or laptop computer. There are two basic approaches. First, you can have a program on the Arduino (written in Wiring) communicate with a program on the computer (written in Processing) via a serial connection. Since the Wiring language is basically a dialect of the Processing language, many of the commands are the same on both sides of the connection. Second, you can download a special program to the Arduino called Firmata. Once this is installed, you control the Arduino from a program on the computer. Again, we will use Processing for programming on the computer side.
In both cases, you have to understand a little bit about communications protocols.
Background Preparation and Readings
-
World Famous Index of Arduino and Freeduino Knowledge - spend 15 or 20 minutes browsing this, then bookmark it for future reference
-
Serial Communication - don't panic, just cling to the bits you can understand
-
Serial Out using an Arduino - skim this
-
Serial Duplex using an Arduino - skim this
-
Firmata Library reference page - make sure to study the example code, even if you are not sure exactly how it works; we will discuss this more in class
-
Part 1. Getting Arduino, Processing and Firmata up and running - read through Part 1 only
-
Firmata - reference
In Class
Most of you have already installed Processing. If you get a chance to download the
Firmata Arduino library to your laptop before class, please do so. In class, we will break into groups, install Firmata on our Arduinos, and then write some programs on the computers that can control Arduinos.
Other Resources
-
Physical Interaction Design (PID) - we're doing something similar, but using Processing instead of PD or Max/MSP
-
Firmata Set Up Tutorial - this makes use of Openframeworks, a more complicated software package that we haven't explored yet

