Skip to content
Learning Site
Home

About

  • About Robotical
  • Case Studies
  • Meet the Team
  • Blog
  • Contact Us

Our Products

  • Marty the Robot
  • Axiom
  • Cog

Teach

  • Lessons & Resources
  • Marty for Educators
  • Funding & Grants
  • Professional Development
  • Why Teach STEM?
  • Coding Environments
  • Student Led Learning

Let's Code

  • Marty the Robot
  • Code Online
  • Marty Apple App
  • Marty Android App
  • Update your Marty
  • Cog
  • Code Online
  • Cog iOS App
  • Cog Android App
  • Axiom
  • Axiom Science

Support

  • Marty Get Started
  • Cog Quick Start Guide
  • Axiom Science Quick Start Guide
  • Support & FAQs
  • Marty V2 User Guides
  • Marty V1 Resources
  • Request Support
  • Request Top-Up Training

Shop

  • Marty the Robot and Physical Computing
  • Class Packs
  • Add Ons & Extras
  • Account
  • Shipping, Returns & Cancellations
  • Distributors
HomeLessonsUnits of workCurriculum standardsTutorials

Information

  • Lessons & Resources
  • Knowledge Base & User Guides
  • About Us
  • Shipping, Returns & Cancellation
  • Privacy Policy
  • Learning site privacy
  • Terms of Service
  • Partner Hub

Support & Help

  • Support & Help Center
  • Getting Started with Marty V2
  • Getting Started with Marty V1

Learning, Resources & Guides

  • Marty V2 Lessons Site
  • Marty V1 Lessons Site

Contact Us in the UK

Stanhope House,12 Stanhope Place,Edinburgh,United Kingdom,EH12 5HH
(+44) 0131 564 0922
hello@robotical.io
Contact Us

Contact Us in the US

2810N Church St, PMB 61694,Wilmington,Delaware,USA19802-4447
(+1) 833 886 1661
hello@robotical.io
Contact Us

Why not join our mailing list?

For News, New Products and Special Offers

Join mailing list

Copyright 2016-2026 © Robotical Ltd

All lessons
Marty app
CurrentPrevious

2.23: Noise Sensors and Parallel Programming

Use Marty's noise sensors to trigger a response when a change occurs

2.23: Noise Sensors and Parallel Programming
Age / stage
8 - 10
Estimated time
45 minutes
Difficulty
Intermediate
Products
Marty V2

On this page

  1. Lesson overview
  2. Before you begin
  3. Warm-up
  4. Get learning
  5. Further challenge ideas
  6. Cool down
  7. Additional reading
  8. Curriculum standards

Additional reading

Ideas for where to use a noise sensor:

  • In a workplace reliant on computers
  • Applications for sound sensors (about halfway down the page)
  • Sensor use in hospitals
  • Introduction to parallel programming
  • Using parallel programming with disco feet lights

Curriculum standards

18
Choose your curriculum to see the relevant standards.

18 of 18 linked standards shown.

Australian CurriculumAustralia2
Curriculum areaLinked standards
Digital Technologies, Design & technologies: Digital Technologies

Select a code to read the full standard.

Digital Technologies, Design & technologies: Digital Technologies

  • ACTDIP027Define and decompose real-world problems taking into account functional requirements and economic, environmental, social, technical and usability constraints
  • ACTDIP032Plan and manage projects that create and communicate ideas and information collaboratively online, taking safety and social contexts into account
CSTA Education StandardsUSA2
Curriculum areaLinked standards
General standards

Select a code to read the full standard.

  • 2-CS-02Design projects that combine hardware and software components to collect and exchange data.
  • 2-AP-14Create procedures with parameters to organize code and make it easier to reuse.
Curriculum for ExcellenceScotland9
Curriculum areaLinked standards
Health and Wellbeing: Mental, Emotional, Social and Physical Wellbeing
Literacy & English: Listening and Talking
Literacy & English: Writing
Numeracy: Number, Money and Measure
Technologies: Computing Science

Select a code to read the full standard.

Health and Wellbeing: Mental, Emotional, Social and Physical Wellbeing

  • HWB 0-11a / HWB 1-11a / HWB 2-11a / HWB 3-11a / HWB 4-11Social wellbeing
  • HWB 0-14a / HWB 1-14a / HWB 2-14a / HWB 3-14a / HWB 4-14aSocial wellbeing

Literacy & English: Listening and Talking

  • LIT 2-02aTools for listening and talking
  • LIT 2-07aUnderstanding, analysing and evaluating

Literacy & English: Writing

  • LIT 2-23aTools for writing
  • LIT 2-28aCreating texts

Numeracy: Number, Money and Measure

  • MNU 2-01aEstimation and rounding

Technologies: Computing Science

  • TCH 2-14bUnderstanding and analysing computing technology
  • TCH 2-15aDesigning, building and testing computing solutions
England's National CurriculumEngland2
Curriculum areaLinked standards
Computing, Design and Technology: Computing
Computing, Design and Technology: Design and Technology

Select a code to read the full standard.

Computing, Design and Technology: Computing

  • ✔️Understand what algorithms are; how they are implemented as programs on digital devices; and that programs execute by following precise and unambiguous instructions

Computing, Design and Technology: Design and Technology

  • ✔️Design purposeful, functional, appealing products for themselves and other users based on design criteria
ISTEUSA3
Curriculum areaLinked standards
International Society for Technology in Education (ISTE)

Select a code to read the full standard.

International Society for Technology in Education (ISTE)

  • 4aStudents know and use a deliberate design process for generating ideas, testing theories, creating innovative artifacts or solving authentic problems.
  • 5dStudents understand how automation works and use algorithmic thinking to develop a sequence of steps to create and test automated solutions.
  • 6cStudents communicate complex ideas clearly and effectively by creating or using a variety of digital objects such as visualizations, models or simulations.

Resources

Learner resources

  • Workbook for Noise Sensors and Parallel ProgrammingFile links loading

Educator resources

  • Teacher GuideFile links loading
  • Noise Sensors and Parallel Programming PresentationFile links loading

Lesson overview

In this lesson, learners are introduced to noise sensors, like the add-on available with Marty v2. These sensors allow Marty to respond when a pre-determined amount of noise is detected. Learners will begin by thinking about noise sensors in their environment, like a classroom, a city street or in a computer, and extend this to program responses, for Marty, when certain conditions are met.

Please read the knowledge base article about the noise sensor addon, before engaging with this lesson.

Learning objectives

  • I can read and use the output from a sensor
  • I can write a condition, in a program, to have a device perform an action depending on the result from a sensor
  • I can create parallel blocks of code

Key vocabulary

  • sensor
  • loop
  • wait block

Prior learning

Experience using sensors with Marty, parallel programming (more than one event block) and nested conditional statements

Before you begin

Equipment

  • Marty the Robot V2
  • Marty Workbook
  • Tablets
  • Access to the Blocks editor
  • Noise Sensor add on for Marty v2

Warm-up

TimingActivityPossible adaptations
Timing—

Warm up

Before starting the lesson, prepare Marty with the code from the lesson, it will respond to sounds and have an action depending on the level of the sound.

Watch on YouTube

Encourage learners to enter the classroom quietly, "Marty is in the room listening and I want to see how quietly we can enter the room; can we be quiet enough for him not to notice?" If the learners manage to enter silently, offer congratulations and tell them that we will need to run a controlled test to see if Marty can hear us. Engage learners in an exercise often used as an icebreaker, called the rainmaker. Show the slides from the presentation with the rainmaker title so that learners do this quietly.

If the environment makes this start to a lesson very difficult, postpone this part of the lesson until after the discussion on noise sensors in our environment. If you are able to show Marty moving, as above, here are the code blocks that were used.

The precise values used in the code above can be tested and changed if necessary. Share the trial and error process with the learners, it can support them on their journey of exploration. The code itself need not be kept when the code is complete, it is just for testing purposes.

Get learning

TimingActivityPossible adaptations
Timing—

Get Learning

Show examples of a sound monitor running on a device, here are links that could be used to download add-ons to your device:

Decibel Meter

Sound Meter

Display the noise sensor block on the board, from the sensing section, either from the presentation or within Scratch. Have learners do the same and, if you are displaying Scratch, click the block to see the result, have the learners click the block whether or not you are displaying Scratch. Have them do this several times to see the different results that are returned. Explain that the drop-down menu is only used where there are two noise sensors being used: if there is only one sensor, left or right can be selected

Encourage learners to think about the value being returned and what a reasonable level is, for a working or learning environment. Revisit the content from the videos, either looking at noise from a hard drive indicating potential breakdown, noise in an office or street indicating potential noise pollution.

Display the scratch screen on the board with the noise sensor block ticked to have its value always displayed. This code block will continually return a value for the noise sensor, but Marty is not acting at all, other than the flashing light in the foot.

Cool down

TimingActivityPossible adaptations
Timing—

Cool Down

Bring learners back together to discuss the challenges they faced and overcame. Have groups model their creations and explain what is happening, when. Encourage other groups to ask questions to deepen the understanding of the processes.

Suggested questions you might ask:

  • How did you determine what values to use for the conditional statements?
  • Did you address all of the values that the noise sensor could record? How did you manage that?
  • Did you check the value from the noise sensor regularly, or just once? Is there value in checking the noise sensor periodically? Why, why not?
  • Were there some actions that did not work well with the code? If you found some, did you decide what the issue was?

Carry out any end of lesson routines.

Log off devices and clear everything away.

Possible adaptations—

If you show the video, or program Marty, for the learners' entrance, discuss what learners think has happened. Record the ideas that they share.

Challenge learners to think about the different processes that were included in the code: Marty didn't just have one action, his responses changed depending on the level of sound. Learners should identify that there is either a nested conditional, a logic block or parallel events being used. If these ideas are suggested, question as to the possible organization. Learners may suggest that it could be Marty is testing if the noise meets a certain threshold, if it does, an action may occur, if it doesn't, a different action might take place. Answers could vary and are explored further in the teacher guide.

*This could be the first part of the warm up, if quiet is difficult to achieve for the classroom environment at the start of the lesson.*

Display the start of the presentation, showing the objectives and success criteria for today's lesson.

Ask learners if they have ever heard of noise sensors being used in an environment. If they have, ask why it might be important to measure sound. How might a certain level of sound affect people? What can certain sounds indicate, for groups or machines? Are there times when certain levels of sound are acceptable or not? Record the suggestions.

This video showcases a product that monitors noise in a home and reports the values to a user's computer.

Watch on YouTube

The video below highlights how noise sensors monitor city noise and alerts city workers to areas where noise is too high, so that they can respond to complaints efficiently. There is no need to play the full video.

Watch video

Possible adaptations—
Watch on YouTube

Have learners discuss the use of this value. We need Marty to respond to what is returned. We can see that the value returned changes regularly because the microphone is sensitive. How can we make some conditions that result in different actions depending on the sound; what should the changing actions be; should we display the actions for a short or long time?

Learners may have noticed that the sound was made at the same time as the movement; additionally, the left and right arms move at the same time. Question if they can think about how this might happen. Remind that in learner's code, they have an event to start one sequence. What happens if we have two events at the same time? If learners have forgotten parallel programming, have them start small with a simple movement in the different blocks, that don't interfere - left arm and right arm - without the need for ifs, loops or sensors. Once they have seen the different non-overlapping actions, have them work to trigger the actions based on noise.

After some time for group discussion, bring learners together to talk about what they might want Marty to do and how they plan to have Marty do it.

Possible adaptations—
Timing—

Time for Practice

Learners need to take their ideas, form a plan, and begin to code responses for Marty. This process should include a lot of testing and changing values for wait times, for conditional values and for movement timings and for the movements themselves. Encourage experimentation, encourage discussion about what is seen and if it is what the whole group wants. When learners get it wrong, feel free to inform that the person who developed this code definitely didn't get it on the first, second or even third attempt.

Before learners begin working on their code, remind them of the success criteria that were shared, earlier. While groups are designing their code, have them document the challenges they faced and the steps they took. It will support sharing at the end of the lesson.

Possible adaptations

Support

Have physical code cards available for learners to use, when building their scripts:

  • if/then and if/then/else blocks
  • loops
  • light sensor blocks
  • operator blocks: <, >, =
  • a variety of movement blocks

Have a print out of the basic loop statement, using the noise sensor.

Further challenge ideas

Extend

Challenge learners to fine tune the sensor values:

  • fine tune the responses to different noise levels - increase the number of conditions and make reactions faster
  • Include logic blocks in the code to either make conditions more specific or to combine different actions