pyI2C I2C

Pure Python I2C : access to I2C components through serial or parallel interface.


Note : no warranty, no liability, project is provided 'as is' but I hope you will enjoy it !

Why ?

Access to I2C components from a very low cost interface, in pure python, over serial, parallel (maybe more in the future) interfaces, with a minimum hardware. This implementation is intended to be fast but simple and minimalist.

Features (0.3)

Future features


>>> import I2C
>>> import I2C.sensors

>>> i2c = I2C.BusI2C('COM2')
>>> i2c.bus.setSpeed(2000)  # you can set i2c speed adapted to your hardware
>>> sonde = I2C.sensors.LM75('Room 1', i2c)
>>> print "T =  %02.03f C" % sonde.getTemperature()
get more examples here

Example minimal serial port I2C interface

This interface is really low speed and minimalist, it's based on specific optos. You can find better also better solutions :

Example minimal parallel port I2C interface

It-s possible to select SDA input signal, python driver can be easily adapted to you choice.

Python packages required

Win32 platform

pyParallel need you install and start giveio.sys driver


pyParallel on linux is based on ppdev module, make sure ppdev module is loaded and not lp. add change device access rights to make non root users or add users in right group (lp group on most systems). On most systems, ppdev is not the default parallel port handler, you must make sure module ppdev is loaded :
sudo modprobe ppde
sudo rmmod lp
sudo chmod go+rw /dev/parport0

Install from tarball

tar -xvzf pyI2C-0.3.tar.gz
cd pyI2C
python install Logo Project source code protected by PYTHON licence, Patrick Nomblot 2006 PythonPowered Logo