Introduce OpenPythonSensor Library

Introduce the Python driven, I2C focused, Embedded Linux application level library for digital sensors – OpenPythonLibrary.

The very first version includes supports for:

  • BMP180 Barometric Pressure sensor;
  • HTU21D Relative Humidity sensor (Only support Beaglebone Black at this moment);
  • SI1145 Proximity/UV/Ambient Light sensor;
  • TMP007 Infrared Thermopile sensor;
  • HMC6352 Digital Compass;
  • MPU6050 Six-Axis (Gyro + Accelerometer) MEMS;

The I2C bus is set to 1 in OpenPythonSensor / ops_base / and can be modified to support more development platforms. The python-smbus is a prerequisite of this library.

The library can be found at Github under MIT License.

Example usage of the library
from lib_htu21d import HTU21D
# Initialize the library
htu = HTU21D()
temp = htu.readTemperatureData()
rh = htu.readHumidityData()
print "Temperature: %.2f C, Humidity: %.2f %%" % (temp, rh)
Clone the code
git clone
Download the library

Click -> GitHub_Logo to download

Part of the library is ported from Adafruit-Raspberry-Pi-Python-Code and should remain it’s original license. Some driver is referenced from both Adafruit and Sparkfun and thanks to their original work.

More sensor support will coming soon!


python powered Boris_Tux_PNG

2 thoughts on “Introduce OpenPythonSensor Library

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.