Fire Danger Warning Sign

Using your SenseHat

Open the starter project at bit.ly/mhwarningsign
If you have a physical Raspberry Pi with a SenseHat, open a new Python project in Thonny.
The first line will tell Python to use version 3 of Python.
If you’re using the online emulator, this should already be there for you.

We want to tell Python that we will be using the SenseHat, so the first thing we need to do is to import the SenseHat module.
Add this code, then press Run at the top of the screen to test it.

You might see an AstroPi appear on the right of the screen.
We want to use the regular Raspberry Pi, not the AstroPi, so press the little Raspberry Pi toggle button on the bottom right of the screen.

The AstroPi should turn into the regular Raspberry Pi.

Finally, for this step, we’re going to use a variable to refer to our SenseHat to make our code easier.
Add the following line of code.