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.
IOW24-DG with I2C Sensors BME280, LM75 and TSL2591 under Python Control
Moderator: Guido Körber
Re: IOW24-DG with I2C Sensors BME280, LM75 and TSL2591 under Python Control
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
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