Arduino Development for OSX and iOS (2015)
3. Controlling Arduino from OSX
3.3 Firmata and Python
pyFirmata uses Firmata protocol for implementation. It's based on the Processing Library for Arduino and currently support firmata v2.1. Further information, you can visit on http://firmata.org/ . You can access the source code on https://github.com/tino/pyFirmata .
Let's try this library to access Arduino.
You can install pyFirmata using pip and compiled from source code. The library needs pySerial, http://pyserial.sourceforge.net and you can install pySerial by following this guideline, http://pyserial.sourceforge.net/pyserial.html#installation.
You can install pySerial via pip.
$ sudo pip install pyserial
You can install pySerial via easy_install tool.
$ sudo easy_install -U pyserial
After that, you can install Python Firmata as follows.
sudo pip install pyfirmata
You can install pyFirmata from source code.
git clone https://github.com/tino/pyFirmata
cd pyFirmata
python setup.py install