GreenPonik_BME280.py Library for Raspberry pi
This is the sample code for read light with BME280 sensor.
Table of Contents
- GreenPonik_BME280.py Library for Raspberry pi
- Table of Contents
- Installation
- Methods
- Examples
- Credits
Installation
> git clone https://github.com/GreenPonik/GreenPonik_BME280.git
cd GreenPonik_BME280
pip3 install -r requirements.txt
or
> pip3 install greenponik-bme280
from GreenPonik_BME280.BME280 import BME280
Methods
"""
Get light data
"""
def read_bme280():
Example
import time
from GreenPonik_BME280.BME280 import BME280
if __name__ == "__main__":
try:
bme = BME280()
while True:
data = bme.read_bme280()
print(data)
time.sleep(1)
except Exception as e:
print('An exception occurred: {}'.format(e))
Credits
Write by Mickael Lehoux, from GreenPonik, 2019