Table of Contents

Phidgets software

The phidgets software consist of 1) a C library to comunicate with the hardware and 2) the python bindings that uses this library. Here are the installation instructions.

Phidgets C library

cd local/src
wget http://www.phidgets.com/downloads/libraries/libphidget_2.1.8.20111121.tar.gz
wget http://www.phidgets.com/downloads/libraries/PhidgetsPython_2.1.8.20111121.zip
tar -xzf libphidget_2.1.8.20111121.tar.gz
unzip PhidgetsPython_2.1.8.20111121.zip
cd libphidget-2.1.8.20111121/
./configure --prefix=/home/replace_with_your_user/local/DIR/libphidget-2.1.8.20111121/
make
make install
cd ~/local/DIR
xstow libphidget-2.1.8.20111121

Phidgets python bindings

cd ~/local/src/PhidgetsPython/
python setup.py install --prefix=/home/replace_with_your_user/local/DIR/phidgetspython
cd ~/local/DIR/
xstow phidgetspython

Giving permissions to users to use the phidgets hardware

cd ~/local/src/libphidget-2.1.8.20111121/udev/
sudo cp 99-phidgets.rules /etc/udev/rules.d/
/etc/init.d/udev restart
Download the Python examples
python InterfaceKit-simple.py
Small example
from Phidgets.PhidgetException import *
from Phidgets.Events.Events import *
from Phidgets.Devices import *
ik=InterfaceKit.InterfaceKit()
ik.openPhidget()
ik.waitForAttach(10000)
print ik.getSensorValue(0)
lcd=TextLCD.TextLCD()
lcd.openPhidget()
lcd.waitForAttach(0)
lcd.setDisplayString(0,"hello world") 
ik.closePhidget()
lcd.closePhidget()

For help, check the examples, as well as the Python API documentation:

here