Skip to content
Snippets Groups Projects
Verified Commit bd2c8ead authored by rahix's avatar rahix
Browse files

fix(bme680-app): Fix display output


The transparent background patch messes up the display for the BME680
app.  This patch uses proper formatting codes which will make the output
readable again.

Signed-off-by: default avatarRahix <rahix@rahix.de>
parent ee45bbd8
No related branches found
No related tags found
No related merge requests found
......@@ -20,10 +20,10 @@ def main():
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.print("BME680", posx=38)
disp.print("{:7.2f} C".format(sensor_data[0]), posy=20)
disp.print("{:7.2f} rh".format(sensor_data[1]), posy=40)
disp.print("{:7.2f} hPa".format(sensor_data[2]), posy=60)
disp.update()
utime.sleep(10)
......
{"author": "chris007", "name": "BME680 Sensor Demo", "description": "Demo for the BME860 Sensor", "category": "Hardware", "revision": 1}
{"author": "chris007", "name": "BME680", "description": "Demo for the BME860 Sensor", "category": "Hardware", "revision": 1}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment