Commit e08ab5df authored by Rahix's avatar Rahix
Browse files

Merge branch 'bme680_demoapp' into 'master'

Add BME680 Demo App which shows Temperature, Humidity and
Pressure.  Updates every 10 seconds.

See merge request card10/firmware!180
parents 42afe42f 2604e539
"""
BME680 Demo
===========
This app shows the current readings of the BME680 sensor
"""
import buttons
import color
import display
import os
import utime
import bme680
def main():
bme680.init()
disp = display.open()
disp.clear().update()
while True:
sensor_data = bme680.get_data()
disp.clear()
disp.print("BME680 Sensor")
disp.print("{} C".format(str(sensor_data[0])), posy=20)
disp.print("{} rh".format(str(sensor_data[1])), posy=40)
disp.print("{} hPa".format(str(sensor_data[2])), posy=60)
disp.update()
utime.sleep(10)
if __name__ == "__main__":
main()
{"author": "chris007", "name": "BME680 Sensor Demo", "description": "Demo for the BME860 Sensor", "category": "Hardware", "revision": 1}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment