Operation Manual
Human-computer interfacing
134
Notes:
Arduino interface
To complete this exercise you will need the Python Serial Port Extension. You can
either install this from the Raspberry Pi SD card or download them from
http://pypi.python.org/pypi/pyserial/. You will also need the Debian package
called “arduino”, in order to install the Arduino development IDE. You can
download this from the Debian website.
Obviously, you will also need an Arduino board.
Arduino is an open-source electronics prototyping platform based on flexible,
easy-to-use hardware and software. An Arduino board connected to a
Raspberry Pi is a very useful and powerful combination. You can learn more about
the Arduino platform at the website http://www.arduino.cc/
This example uses an Arduino board connected to a Raspberry Pi using a USB
cable. You do not have to build any circuits to make this program work – that is left
up to your imagination. This program is very simple; it asks for a character on your
Raspberry Pi, and then sends it to the Arduino. The Arduino responds by returning
the character and its ASCII code. Finally, the response is printed on the screen of
the Raspberry Pi.