IOW24-DG with I2C Sensors BME280, LM75 and TSL2591 under Python Control

This is the English forum for all topics related to IO-Warrior. Please post in English only

Moderator: Guido Körber

Post Reply
ullix
Posts: 14
Joined: Thu Mar 01, 2018 12:27 pm

IOW24-DG with I2C Sensors BME280, LM75 and TSL2591 under Python Control

Post by ullix »

After some struggling and help from the forum I succeeded in putting together a Python script to run the I2C sensors BME280, LM75 and TSL2591 attached to an IOW24-DG. This gives temperature, humidity, air pressure and light intensity (vis + IR). A plot of some data is shown in the picture below.

The LM75 is very easy to program, the BME280 quite tough, in particular to convert the raw data to final data. The final data from the BME280 are in agreement with other electronic and non-electronic sensors in my house, though due to the complexity of the conversion, I'd like to verify the results from my Python script with those calculated by the official code, which is so strongly emphasized by Bosch. Can anyone help?

The Python3 program I2Cpytools is open source and available here: https://sourceforge.net/projects/i2cpytools/. The graphic is plotted with pytoolsPlot, which is integrated into the package but also available as a stand-alone program for plotting any type of CSV(Comma Separated Values) data.

In addition to the IOW24-DG dongle, I2Cpytools also supports the ELV USB-I2C dongle from ELV Elektronik AG. Other dongles in preparation.

Enjoy.

Image
jmmelkon
Posts: 9
Joined: Tue Nov 30, 2021 5:33 pm

Re: IOW24-DG with I2C Sensors BME280, LM75 and TSL2591 under Python Control

Post by jmmelkon »

Hi,

I love your work!

I am going to try adding the SCD41 sensor.

Could you please resume the necessary steps?

1/ add a dictionary in the glob
2/ create a class
3/ modify the unix script

Is there any example on how to run the script from a Python console directly? I mean, instead of a unix script.

thanks
Post Reply