


Create a function called “humidity” tol scroll the current humidity levels across the RGB LED matrix. In this case it contains, white, red and off. Then we create three tuples that contain the RGB values for the RGB LEDs. The sense object creates an easy to use connection to the Sense HAT hardware.

Create four objects to create a connection to the Sense HAT, and to set the colors of the RGB LED Matrix. The final import sees us import the random integer generator function from the random library. The first enables us to use the Sense HAT and the second allows us to add pauses to the code. Open Thonny, found in the Programming menu.Ĥ. You may want to use some M2.5 standoffs to support the front of the Sense HAT.ģ. Attach the Sense HAT to all 40 GPIO pins with the Pi turned off. We will also scroll the current temperature across the RGB LED matrix each time the Sense HAT is shook.ġ. We will create a means to use the joystick to start one of four actions, including one action that uses our orientation to set the color of the RGB LED matrix. Our project is a simple test of inputs, sensors and the RGB matrix. All of these features can be controlled by a simple Python library, and the best thing is, it is pre-installed in Raspberry Pi OS and ready to use.
