1
0
mirror of https://github.com/cmur2/python-bme280.git synced 2025-10-13 12:02:30 +02:00

module: add pylint and fix accordingly

This commit is contained in:
cn
2018-03-14 22:52:10 +01:00
parent 6aabf21cf8
commit f9b9d77ded
6 changed files with 624 additions and 57 deletions

14
demo.py
View File

@@ -1,10 +1,12 @@
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import bme280
if __name__ == '__main__':
bme = bme280.Bme280()
bme.set_mode(bme280.MODE_FORCED)
t, p, h = bme.get_data()
print "Temperature: %f °C" % t
print "Pressure: %f P" % p
print "Humidity: %f %" % h
bme = bme280.Bme280()
bme.set_mode(bme280.MODE_FORCED)
t, p, h = bme.get_data()
print "Temperature: %f °C" % t
print "Pressure: %f P" % p
print "Humidity: %f %%" % h