Create a Weather Station

(Using a Raspberry Pi & Sense Hat)

DIRECTIONS: Click on the blue “Share” button & share this document to your classroom teacher and to Ms. Haughs ( Then complete the tasks/readings/videos/activities in each box below.


What do you notice in the image to the left?

What do you think the different colors mean?

(Type your responses below)

#Explain & Think

Double click image to open the Drawing.

Then double click image again to watch the video.

Why is it helpful for a community to be able to predict local weather?

(Type your response below)

Double click image to open the Drawing.

Then double click image again to watch the video.

What is air pressure?

(Type your response below)

What type of weather might high air pressure bring? Low air pressure?

(Type your response below)


What is the Raspberry Pi Sense Hat?

*After watching the video to the left about the Sense Hat:

  • Click on the Padlet icon below, then the link to our Padlet wall
  • Share what you’ve learned
  • Do some brainstorming


Let’s create our weather station!

Step #1


Set up the hardware…(RPi & SenseHat):

Use GPIO rainbow cable or use individual jumper cables (if you need to attach more inputs/outputs that the Sense Hat to the GPIO pins)

*Read more here about how to do this

Step #2

Test Code:

Let’s make sure everything is hooked up correctly & working!

  • Open the Python app (IDLE 3)
  • Import “SenseHat” commands from “sense_hat” library, “sleep” from “time” library, “datetime” from “datetime” library
  • Program a scrolling message on LED matrix & run your code to test

(see images of sample code-- the black text-- below)

Step #3



What data do we want the Sense Hat to collect? What do we want to print in shell window or scroll on LED matrix or both?

*One storyboard per team should be turned in

Step #4


Create variables for measurements

  • In the Sense Hat library, “sense.get_temperature” means read the temperature using the appropriate sensor on the HAT, but that’s a long command to write every time we need to use it in our code
  • So… we can create a variable (a letter or word of our choice) to represent the word temperature
  • Every time our computer sees us use the variable we create in our code, it knows we mean “sense.get_temperature”
  • We will also edit those variable so that our measurements are rounded off to the nearest decimal point (otherwise the numbers retrieved are very long decimals!)

**You’ll want to create a variable for each sensor you’re using [get_temperature(), get_barometer(), get_pressure()]

Step #5


Take measurements, scrolling message, print to shell

Step #6


Design Images to Appear on LED Matrix:

Let’s add some images that display on the LED matrix!

  • Decide what images you want to appear on the LED screen
  • (Don’t forget to share your design with your team & your teachers!)
  • Look up the RGB codes for each color you plan to use in your design & write the codes down on your design planning doc (computers don’t recognize color names, only RGB codes… the mix of red/green/blue that make each color)

Step #7

More Variables:

Create variables for colors you’ll be using

Create variables for the images you want to make

  • You need to create a variable for each image you want to show on the LED matrix

Step #8

More Coding:

Using a conditional statement (if/then)…

  • Display certain image on LED matrix depending on data collected

When you’re done, your program should look something similar to this:

LINK to completed program


What worked well?


What has been challenging & what did you do to overcome those challenges?



Once you’re done with your completed project, share it!

  • Take some pictures
  • Write up a reflection/create a collage/create a video/etc. that explains what you did, what challenges you hit along the way, and how you solved problems.  
  • Share your project & reflection in a blog, on a Padlet, in Google Classroom, in Seesaw, etc.


#Next Steps

What else does your weather station need?

  • i.e. Does it need a case? How will you keep it protected? How will you display the station?

Do you want to add any extra features?

  • Examples:
  • A camera that turns on when the temperature dips below a certain level?
  • Motion sensor to capture wind activity?
  • Audio?
  • Wheels & a chassis so that you can ‘drive’ your station to different areas at different times of day?
  • What else?  Be creative if you have more time! :)

Can you explain the creation process to your peers? Others?

Created by Amanda Haughs using hyperdoc template by Teachers Give Teachers