mirror of
https://github.com/cmur2/python-bme280.git
synced 2025-10-13 12:02:30 +02:00
module: use yapf formatter, reduce pylint warnings
This commit is contained in:
14
demo.py
14
demo.py
@@ -1,12 +1,16 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: UTF-8 -*-
|
||||
|
||||
import bme280
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
def 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
|
||||
print("Temperature: %f °C" % t)
|
||||
print("Pressure: %f P" % p)
|
||||
print("Humidity: %f %%" % h)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
Reference in New Issue
Block a user