Installing and testing the python-twisted framework
In this task, we will review the
python-twisted
framework (https://twistedmatrix.com/trac/). The Twisted framework is an open source event-driven network engine that can be used to send control messages to other devices (for example, a pet feeder can be operated using Raspberry Pi to dispense solid food to our animal friends). The messaging protocol is called
AMP (Asynchronous Messaging Protocol) which is available at http://amp-protocol.net/.
Prepare for lift off
The Raspberry Pi (with an SD card flashed with the OS image) connected to the Internet is needed for this task along with an Arduino Ethernet Board (or any one of the boards mentioned earlier in the checklist. Network connectivity is essential). We will install the python-twisted
framework and review a quick example to exchange messages between Arduino and the Raspberry Pi.
Engage thrusters
The
python-twisted
framework can be installed from the terminal of the Raspberry Pi as follows...