GRADE 7 · COMPUTING · UNIT 6 · LESSON 6.12
Sequencing and pattern recognition: Getting the message across
Final project: Sound-triggered visual alarm
Read a little. Try the workbook. Check your answers. Choose one section below to get started.
LET’S TRACE, REASON AND TEST
Final project: Sound-triggered visual alarm
Book extension, project or review · original companion practice
Design the sound-triggered visual alarm from explicit requirements: input rule, placement, images, brightness, timing and return to monitoring. A prototype helps investigate the design; a loudness trigger does not recognise the identity of a school buzzer.
- Specify a sound-triggered visual alarm using a flowchart, a light-sequence sub-routine and numbered image grids.
- Implement the planned prototype in MicroPython and flash it to suitable hardware.

Explore the clues
Tap one card to find out more.
Understand the idea
Design the sound-triggered visual alarm from explicit requirements: input rule, placement, images, brightness, timing and return to monitoring. A prototype helps investigate the design; a loudness trigger does not recognise the identity of a school buzzer.
Concept to practise: Final project: Sound-triggered visual alarm.
Work through an example
The original starter activates when a micro:bit V2 microphone reading is greater than 150 on its relative 0–255 scale. Exactly 150 does not activate it. These readings are not decibels, and the simple routine does not sample while waiting.
Try before your workbook
Which boundary and timing cases should you include before claiming that the alarm matches your specification?
Check my readiness thinking
Test below, equal to and above the threshold, no trigger, a sound during the busy sequence and a possible retrigger afterward. Record actual revision and results. Specify any change to sampling or trigger policy; do not claim buzzer recognition from loudness alone.
Your original programs and learning models
These original PaxaKids program and data models support your workbook. Some examples deliberately contain faults to investigate. Follow their headings and preserve exact code case, punctuation and order. Traces and supplied records are not claims of physical testing.
Design a visual signal for the classroom
Plan where the board will be placed, what the sound input means, and which light patterns, brightness settings and timings suit the intended viewers.
Make the requirements concrete
| Decision | What your specification must identify |
|---|---|
| Trigger | A sound-input rule and a classroom test sound representing the buzzer. |
| Location | Where the board will hear the test sound and be visible to pupils. |
| Sequence | A named routine, ordered images or letter grids and the final state. |
| Brightness and timing | Exact 0–9 digits and waits in milliseconds for each image. |
| Inactive behaviour | What happens before activation and without the trigger. |
| Further activations | Whether sustained or repeated sounds should start another sequence. |
Plan the input, selection and named routine
Decision: level > threshold?
True branch
- light_sequence
False branch
- Clear display
Number every image and its brightness grid
Each five-by-five table gives exact LED brightness digits: 0 is off; 9 is maximum. Rows run top to bottom and columns left to right.
| Row / column | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 0 | 0 | 3 | 0 | 0 |
| 2 | 0 | 0 | 3 | 0 | 0 |
| 3 | 0 | 0 | 3 | 0 | 0 |
| 4 | 0 | 0 | 0 | 0 | 0 |
| 5 | 0 | 0 | 3 | 0 | 0 |
| Row / column | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 0 | 0 | 9 | 0 | 0 |
| 2 | 0 | 0 | 9 | 0 | 0 |
| 3 | 0 | 0 | 9 | 0 | 0 |
| 4 | 0 | 0 | 0 | 0 | 0 |
| 5 | 0 | 0 | 9 | 0 | 0 |
| Row / column | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 0 | 0 | 0 | 0 | 0 |
| 2 | 0 | 0 | 0 | 0 | 0 |
| 3 | 0 | 0 | 0 | 0 | 0 |
| 4 | 0 | 0 | 0 | 0 | 0 |
| 5 | 0 | 0 | 0 | 0 | 0 |
Edit the complete original project starter
Original program model
from microbit import *
TRIGGER_LEVEL = 150
frame_1 = Image("00000:00000:00000:00000:00000")
frame_2 = Image("00000:00000:00000:00000:00000")
frame_3 = Image("00000:00000:00000:00000:00000")
def light_sequence():
display.show(frame_1)
sleep(500)
display.show(frame_2)
sleep(500)
display.show(frame_3)
sleep(500)
display.clear()
display.clear()
while True:
level = microphone.sound_level()
if level > TRIGGER_LEVEL:
light_sequence()
else:
display.clear()
sleep(30)Plan tests before coding; record observations after
Use micro:bit V2 for the built-in microphone. A V1 board needs a suitable external sound sensor and changed input code. A button/shake adaptation is a separate preparation activity.
The simple starter does not sample while its routine is waiting. When sound remains above the threshold, a later sample can start another sequence. A short sound occurring entirely between samples can be missed. Check whether that behaviour fits your requirement.
| Check | What to specify and compare |
|---|---|
| Trigger / no trigger | Intended sound, background sound and any numeric boundaries. |
| Sequence / completion | Every grid, brightness, order, wait and final display state. |
| Repeated input / visibility | Sustained or repeated sound; viewing position and lighting. |
Practice files for this lesson
Save a copy of these original PaxaKids learner files before editing in suitable software. Some code and datasets deliberately need completion or repair. Downloading a file does not run it. Use invented data; record actual tests separately from predictions. Native software practice files are not print-optimised; use the student PDF for printing.

Try one step with Paxa!
Use supplied fictional records. Do not disclose personal details, upload private photos or bypass browser warnings to complete an activity. Save personal responses before leaving.
Our Unit 6 learning path
- Lesson 6.1: Prototyping
- Lesson 6.2: Pattern recognition
- Lesson 6.3: Patterns between text-based programming languages
- Lesson 6.4: Boolean selection and sub-routines
- Lesson 6.5: Project plans and test plans
- Lesson 6.6: Identifying errors and debugging
- Lesson 6.7: Sequences and lights
- Lesson 6.8: Creating a moving sequence of lights
- Lesson 6.9: Extending a light sequence
- Lesson 6.10: Light brightness
- Lesson 6.11: Loading-screen and name-sequence extensions
- Lesson 6.12: Final project: Sound-triggered visual alarm
- Lesson 6.13: Evaluation
- Lesson 6.14: What can you do?
For grown-ups: using this lesson
Your answers are checked in your browser. Open responses need grown-up review and are shown separately from the automatic score. Check your work, then use “Retry answers to practise” to revisit mistakes while keeping correct responses.
Read one explanation, discuss the model and try the readiness check before the workbook. Choose “Mark lesson finished” when ready. Optional account progress saves lesson position and completion across devices; save personal responses before leaving.
2. Fill in your workbook
Read the teaching and the complete workbook instructions. Choose, write or draw; Answer list offers larger controls. Trace code precisely and distinguish predictions from actual tests. Review designs, explanations and drawings with a grown-up.
Opening your PDF…
Swipe sideways across the worksheet on a small screen, or use “Answer list” for larger controls.
You’ve completed the checked activities.
TAKE YOUR PRACTICE OFFLINE
3. Download the student worksheet
All 8 original A4 student pages, ready for pencil-and-paper practice. Choose Review Answers to check your work on this webpage.
Student worksheet only · PDF · 8.3 MiB · No answer key included
TRY FIRST, THEN CHECK TOGETHER
Download the student worksheet →4. Answers & guidance
Finished your try? Open the guide and compare one worksheet at a time. Your own words may be different and still explain the right idea.
Shown on this webpage only. There is no answer-key download, and this guide is left out when printing the page.
Show answers for all 8 worksheets
Worksheet 1
- Question 1: What is the purpose of this prototype? test and improve a proposed classroom visual alert
- Question 2: Which input is required for this final project? a sound sensor
Worksheet 2
- Question 3: Does an ordinary sound-level threshold uniquely recognise the buzzer? no; other sounds can also cross it
Worksheet 3
- Question 4: For the starter threshold 150, which reading activates? 151
Worksheet 4
- Question 5: What makes a different learner sequence acceptable? a clear purpose, complete grids and agreement between plan, source and tests
Worksheet 5
This page introduces the activity. There are no marked responses on this sheet.
Worksheet 6
This page introduces the activity. There are no marked responses on this sheet.
Worksheet 7
- Question 6: Write a short paragraph explaining the meaning and purpose of your prototype for the classroom problem. Create the main flowchart with sound input, explicit True/False branches and a named light-sequence subroutine. Number every image and provide its complete five-by-five brightness grid, timing and final state. Complete the editable test plan and apply it to the flowchart before coding. Identify the saved planning files, findings and any correction. Retain source1 and2a–c: original prototype explanation tied to headphone users/classroom break signal, sound-triggered plan with named routine, all numbered image grids and expected tests applied to the flowchart. Specify intended test sound, location, trigger/API, brightness0–9, timings, inactive and repeated-input policy. Sound threshold is not buzzer identity recognition. Correct symbols, branch labels, call/return, row order and exact digits. Tests cover relevant inputs and expected behaviour, with plan-trace findings labelled separately from actual device results. No invented official learning outcomes or numeric scores. Grown-up review; personal evidence is required.
Worksheet 8
- Question 7: Edit FinalProjectStartingCode_Paxa.py to implement your plan and save the source revision. Connect suitable hardware and flash it. Apply the same test plan to the program and compare it with your flowchart: record actual sound input, all output stages, brightness/timing, final state and repeated/inactive behaviour. Test the intended sound and background noise, then document errors, corrections and retests if needed. Identify the final files and evidence; mark unavailable practical steps Pending. Retain source3a–c: original starter edited to match the learner specification, actual compatible flash, test-plan comparison and correction/retest. Require suitable sound hardware: V2 built-in microphone, or a tested named external-sensor adaptation with changed code; button/shake alone does not meet this final sound requirement. Complete visible sequence and exact source/plan/grid agreement. Actual data and observations with method/revision, or honest Pending. For unmodified strict >150 rule:149/150 inactive,151 active; sustained high can retrigger after the blocking sequence. Do not claim unique buzzer recognition or guaranteed classroom visibility. Correct actual faults if present; no need to invent an error in correct work. No numeric scores. Grown-up review; personal evidence is required.
Curriculum & workbook reference
- Cambridge Lower Secondary Computing 7 Student’s Book — page 223
- PaxaKids Grade 7 Computing Lesson 6.12: Final project: Sound-triggered visual alarm — pages 1–8
Computing for your homeschool day
Explore Final project: Sound-triggered visual alarm with this free Grade 7 Computing lesson. Read one idea together, try the fillable workbook and return to review at your own pace. Download the same student worksheet PDF for pencil-and-paper practice.
Fit learning around your family’s day. There is no timer and no sign-up is needed to use the lesson. An optional account saves your lesson position and completion across devices. Workbook responses and drawings stay in this tab; save a copy of your responses before leaving.
Understand your results
Your answers are checked in your browser. Open responses need grown-up review and are shown separately from the automatic score. Check your work, then use “Retry answers to practise” to revisit mistakes while keeping correct responses.
Choose Review Answers after trying the activity. The guide stays on the webpage; the worksheet download contains only the student pages.
For programme background, visit the Cambridge Lower Secondary Computing overview. PaxaKids provides independent original companion practice.
The book pages identify the related teaching topic. The explanations, characters, programs and exercises here are original PaxaKids companion practice. Practical tasks require the appropriate editor and, where applicable, suitable equipment. A design or paper trace is not a verified hardware result. Only completed, reviewed lessons are listed.
Explore the Cambridge Lower Secondary Computing curriculum for programme background. PaxaKids is an independent learning resource.
