Choose exam board for KS4 Computer Science (GCSE)
Choose exam board for KS4 English
Choose exam board for KS4 French
Choose exam board for KS4 Geography
Choose exam board for KS4 German
Choose exam board for KS4 History
Choose tier for KS4 Maths
Choose exam board for KS4 Music
Choose exam board for KS4 Physical education (GCSE)
Choose exam board for KS4 Religious education (GCSE)
Choose exam board for KS4 Spanish

      Programming project - Sense HAT I

      Lesson details

      Learning outcome

      I can use a Sense HAT to display text and pixel animations.

      Key learning points

      1. The Sense HAT is an add-on board for the Raspberry Pi computer.
      2. HAT stands for Hardware Attached on Top.
      3. The Sense HAT allows you to write programs that interact with the sensors and the LED matrix.
      4. The SenseHAT emulator can be used if you do not have the physical equipment.
      5. You can use lists to set all of the pixels on the matrix in one structure.

      Keywords

      • Sense HAT - hardware that attaches to the top of a Raspberry Pi computer and allows you to write programs that collect data from sensors — it also has an LED matrix for displaying output

      • Sense HAT emulator - a digital representation of the physical Sense HAT device

      Common misconception

      You must have the physical Sense HAT device to practice coding with the Sense HAT.

      You do not have to have the physical Sense HAT to try this out. The Sense HAT emulator provides a digital representation of the device.

      Teacher tip

      If pupils have access to the physical devices of the Raspberry Pi computer and Sense HAT for this lesson, instructions on how to set up this hardware is included as an additional resource for this lesson.

      Equipment

      Pupils need access to a device that can edit and run Python programs and optionally a RPi computer with Sense HAT. Examples in this lesson use the RPF Code Editor https://oak.link/python-editor

      File needed for this lesson

      pixel-art 7.1 KB (XLSX)

      Download this file to use in the lesson.

      Licence

      This content is © Oak National Academy Limited (2026), licensed on Open Government Licence version 3.0
      except where otherwise stated. See Oak's terms & conditions
      (Collection 2).

      Lesson video

      Loading...

      Prior knowledge starter quiz

      6 Questions

      Q1.
      What is a two-dimensional list?

      a list with only one row
      a list with only one column
      Correct answer: a list with rows and columns
      a list of random numbers

      Q2.
      Which keyword describes a set of instructions with a name?

      Correct Answer: subroutine

      Q3.
      What might you use a 2D list for in programming?

      to draw a picture
      Correct answer: to make a game board
      to play music
      to write an essay

      Q4.
      In a 2D list, what does each row contain?

      Correct answer: a list of values
      only one value
      a colour
      a name

      Q5.
      Put these steps in order to create a 2D list for a game board:

      1 - create an empty list
      2 - add lists for each row
      3 - fill each row with values

      Q6.
      Match each keyword to its meaning:

      Correct Answer:two-dimensional,a list with rows and columns

      a list with rows and columns

      Correct Answer:subroutine,a named set of instructions

      a named set of instructions

      Correct Answer:row,values arranged side by side

      values arranged side by side

      Correct Answer:column,values arranged up and down

      values arranged up and down

      6 Questions

      Q1.
      What is the Sense HAT?

      a type of keyboard
      Correct answer: hardware that attaches to a Raspberry Pi
      a web browser
      a programming language

      Q2.
      What does HAT stand for?

      Correct Answer: Hardware Attached on Top

      Q3.
      What is the Sense HAT emulator?

      Correct answer: a digital version of the Sense HAT
      a new type of sensor
      a paper worksheet
      a power supply

      Q4.
      What can you use lists for with the Sense HAT?

      to print documents
      to play sounds
      to browse the internet
      Correct answer: to set all pixels on the matrix

      Q5.
      Put these steps in order to display text on the Sense HAT:

      1 - attach Sense HAT to Raspberry Pi
      2 - write code to display text
      3 - run the code
      4 - see the text on the LED matrix

      Q6.
      Match each keyword to its meaning:

      Correct Answer:Sense HAT,hardware that attaches to a Raspberry Pi

      hardware that attaches to a Raspberry Pi

      Correct Answer:emulator,digital version of a device

      digital version of a device

      Correct Answer:LED matrix,lights for displaying output

      lights for displaying output

      Correct Answer:list,structure to hold pixel data

      structure to hold pixel data


      To help you plan your 10 computer science lesson on: Programming project - Sense HAT I, download all teaching resources for free and adapt to suit your pupils' needs...