1
0
espelhamento de https://github.com/cmur2/python-bme280.git sincronizado 2026-03-23 15:18:30 +01:00
Arquivos
python-bme280/demo.py

17 linhas
285 B
Python

#!/usr/bin/env python
import bme280
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)
if __name__ == '__main__':
main()