The system consists of several components that communicate using OpenSoundControl.
The Car Control service receives OpenSoundControl messages and sends serial commands to the Arduino board that move the servo motors.
The Pure Data interface allows manual control of the cars and sends OpenSoundControl messages to the Car Control service.
The Twitter service allows automatic control of the cars in response to tweets.
The Processing sketch provides a way to display the tweets that are controlling the cars.
Install Arduino, Pure Data, and Processing
You also need Python 2.x which is installed by default on Mac OS X and Linux. Windows users may need to download and install Python 2.x.
The included code was written for Arduino 0022, Pure Data 0.41 and Processing 0187.
If you have trouble getting the code running with newer versions of these languages, try the old versions.
Older versions of Processing than 1.5.1 can only be built from source, so try 1.5.1 first.
The Twitter service was written for an older version of the Twitter API and will most likely need to be updated to use the current API.
Open Arduino/HardDrivin.pde
in the Arduino IDE and upload the sketch to your Arduino board.
$ easy_install tweepy, pyosc, pyyaml, pyserial, simplejson
Rename settings.example.yaml
to settings.yaml
replace ACCESS_KEY
, ACCESS_SECRET
, CONSUMER_KEY
, CONSUMER_SECRET
with the actual credentials.
The Twitter service and Car Control service are Python applications that run as command line processes. Start each one in a separate Terminal window.
$ python CarControl.py
$ python TwitterService.py
Open the PureData\HardDrivin.pd
patch in Pure Data. This interface is useful for manually controlling the cars.
The Processing sketch in Processing\HardDrivinDisplay\HardDrivinDisplay.pde
displays the tweets that control the cars.