Introduction
In this guide, you will get started with using an actual Sense HAT with the Raspberry Pi 3 Model B+.Â
After completing this guide, you will have gathered real-world data using the Sense HAT.
Note: The existing code will work fine on the Raspberry Pi 4 Model B+ as well. However, it will be run on Thonny IDE instead.
Note: The existing code will work fine on the Raspberry Pi 4 Model B+ as well. However, it will be run on Thonny IDE instead.
Tools
-
-
-
sudo idle3 &
-
-
-
from sense_hat import SenseHat sense = SenseHat()
-
from sense_hat import SenseHat sense = SenseHat() temp = sense.get_temperature() pres = sense.get_pressure() hum = sense.get_humidity()
-
from sense_hat import SenseHat sense = SenseHat() temp = sense.get_temperature() pres = sense.get_pressure() hum = sense.get_humidity() print(temp) print(pres) print(hum)
-
from sense_hat import SenseHat sense = SenseHat() temp = sense.get_temperature() temp = round(temp, 1) pres = sense.get_pressure() hum = sense.get_humidity() print(temp) print(pres) print(hum)
-
-