Last active
September 23, 2016 13:27
-
-
Save gthoppae/6d262d978df30f6807a2bc01697bf4c7 to your computer and use it in GitHub Desktop.
Sensor reading from Sense HAT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sense_hat import SenseHat | |
sense = SenseHat() | |
while True: | |
t = sense.get_temperature() | |
p = sense.get_pressure() | |
h = sense.get_humidity() | |
t = round(t, 1) | |
p = round(p, 1) | |
h = round(h, 1) | |
msg = "T={0}, P={1}, H={2}".format(t,p,h) | |
sense.show_message(msg, scroll_speed=0.05) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment