Commit 7d84d0a0 authored by Rousseau Vincent's avatar Rousseau Vincent
Browse files

Add reading of environmental sensors

parent d4cb8abf
from sense_hat import SenseHat
sense = SenseHat()
humidity = sense.get_humidity()
temp_humidity = sense.get_temperature_from_humidity()
print("Humidity sensor : {:.2f} %rH , {:.2f} °C".format(humidity, temp_humidity))
pressure = sense.get_pressure()
temp_pressure = sense.get_temperature_from_pressure()
print("Pressure sensor : {:.2f} Millibars , {:.2f} °C".format(pressure, temp_pressure))
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