Use RPi.bme280 #444
Reference in New Issue
Block a user
Delete Branch "patch-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR introduces usage of RPi.bme280 library, simplifying the temperature/humidity reading code.
It also makes sure the correct python executable is used when running the script. It was using system
pythonbefore which resolves to/usr/bin/python2.7on Raspbian, which is plain wrong I think.sys.executableresolves to the Python executable that octoprint uses, so the command becomes:instead of:
Lastly, it also properly logs errors that occur in the
BME280.pyscript.Tested with Octopi 0.18.0 and octoprint 1.7.0.
ping @vitormhenrique