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.19 Coordinating the Disco Lights with Parallel Programming

Parallel Programming with Disco Marty

2.19 Coordinating the Disco Lights with Parallel Programming
Age / stage
8 - 10
Estimated time
90 minutes
Difficulty
Advanced
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

Choices with an If Statements

Using timing with disco eye lights

Using nested conditional statements with disco arm lights

Using parallel programming with disco feet lights

Curriculum standards

25
Choose your curriculum to see the relevant standards.

25 of 25 linked standards shown.

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

Select a code to read the full standard.

Digital Technologies, Design & technologies: Design & Technologies

  • ACTDEP028Develop project plans that include consideration of resources when making designed solutions individually and collaboratively

Digital Technologies, Design & technologies: Digital Technologies

  • ACTDIP019Design, modify and follow simple algorithms involving sequences of steps, branching, and iteration (repetition)
  • ACTDIP029Design algorithms represented diagrammatically and in English, and trace algorithms to predict output for a given input and to identify errors
  • ACTDIP032Plan and manage projects that create and communicate ideas and information collaboratively online, taking safety and social contexts into account
CSTA Education StandardsUSA3
Curriculum areaLinked standards
General standards

Select a code to read the full standard.

  • 2-AP-12Design and iteratively develop programs that combine control structures, including nested loops and compound conditionals.
  • 2-AP-14Create procedures with parameters to organize code and make it easier to reuse.
  • 2-AP-16Incorporate existing code, media, and libraries into original programs, and give attribution.
Curriculum for ExcellenceScotland11
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
  • MNU 2-10bTime
  • MNU 2-11aMeasurement

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)

  • 1cStudents use technology to seek feedback that informs and improves their practice and to demonstrate their learning in a variety of ways.
  • 4cStudents develop, test and refine prototypes as part of a cyclical design process.
  • 6cStudents communicate complex ideas clearly and effectively by creating or using a variety of digital objects such as visualizations, models or simulations.
TEKSUSA2
Curriculum areaLinked standards
Middle School Technology Applications: Grade 6 to Grade 8

Select a code to read the full standard.

Middle School Technology Applications: Grade 6 to Grade 8

  • 3.DResearch and information fluency. The student acquires, analyzes, and manages content from digital resources. The student is expected to: process data and communicate results.
  • 6.NTechnology operations and concepts. The student demonstrates a thorough understanding of technology concepts, systems, and operations. The student is expected to: integrate two or more technology tools to create a new digital product.

Resources

Learner resources

  • Student Workbook Disco Lights CombinationFile links loading
  • Story textFile links loading

Educator resources

  • Teacher Guide for Disco Lights CombinationFile links loading
  • Coordinating the Disco Lights PresentationFile links loading

Lesson overview

In this lesson, learners will bring together their understanding of the disco light blocks and parallel programming to have multiple actions and multiple responses. Ideas presented here draw on the timing of the lights and responses to movements.

Please read the knowledge base article about the Disco addons, if you haven't already.

Learning objectives

  • Plan code to make use of more than one event block, in parallel.
  • Use parallel blocks to move different parts of Marty at the same time.

Key vocabulary

  • estimate
  • wait until
  • range
  • parallel

Prior learning

Knowledge of parallel programming, conditional statements and loops

Before you begin

Equipment

  • Marty the Robot V2
  • Marty Workbook
  • Tablets
  • Access to the Blocks editor
  • Disco Eyes, Arms and Feet add on for Marty v2

Warm-up

Get learning

Extend

Challenge learners to think of more than one routine for Marty: once part of the song passes, perhaps 4 or 8 bars, Marty changes his move / light display.

Cool down

Activity

Warm up

Read the story text from the resources about a party of adventurers exploring a castle. They come to a point in the story where there is a choice of turning left or turning right at a junction. Ask learners for possible actions they could take: turn left, turn right. The scenario will present a third choice of 'split the party' and go left and right. All three options will have 'consequences'. Read the choices learners suggest, they might suggest any of the three. Hopefully, they will suggest turn left or turn right, first and second; hopefully, they will suggest splitting the party, and going left and right, with the result being progression in the story. However, they might think that the adventurers are stuck. Ask questions about the party: how many people are in the party? Do they have to stick together? Are they able to think for themselves, maybe?

Share the objectives and success criteria from the PowerPoint presentation and then display the example of Marty dancing with accompanying lights across feet, eyes and arms, the actions are coordinated meaning that the lights change with arm, eye and knee movements.

Watch on YouTube

Each of the code blocks is explained in the teacher guide. Discussing efficiency and debugging in coding is worthwhile. It is also worthwhile mentioning that even people at Robotical need to improve on initial code.

The video and code aren't shown side by side here because it would be difficult to see the specific parts. The code is discussed in the teacher guide.

Ask what they noticed, learners may suggest that the arms, legs and eyes move and the lights light up after Marty moves. Highlight that the example they are seeing is using separate event blocks, they are running in parallel.

Activity

Get Learning

This learning time should focus more on planning than writing the code. The program will be bigger than what learners have previously created so it makes a lot of sense for discussion and thinking to be longer than it has in past. Discuss as a class what blocks are essential for parallel programming:

  • learners must offer multiple event blocks,
  • actions or displays that do not conflict (arms for one event block, legs for a different event block),
  • keeping different blocks synced (using wait blocks when needed),
  • communication between blocks of code (if statements that trigger actions in other event blocks; this has been completed in the disco arms and disco feet lessons, or wait blocks that don't progress the code until something else happens).

Display a second video that features the lights and movement not relying on each other.

Watch on YouTube

Ask learners what they see, this time. They may suggest the movement is much quicker because it only happens once. The lights only last as long as the movements because the repeat blocks match the length of the dance.

Once enough feedback is given, by learners, show the next slide that contains four event blocks, one for a movement and 3 for each of the disco light add-ons: this is the code that makes Marty move like the video. Ask learners what they see. Suggestions may include:

  • There are multiple event blocks, so there is parallel programming
  • each of the light blocks repeats
  • the dance block is only used one time
  • everything starts at the same time
  • nothing overlaps

The 'set all LEDs to off' sets all the lights to off, once the code completes. Without this, the lights will stay lit. This is a very helpful block to have for testing this code.

Give time for learners to think about what they might like to have their Marty do, for a dance with the lights. Have groups share some of the ideas they are considering, allow for class questions and discussion around what will happen, how can it happen, where might it run slowly (if necessary)?

Time for Practice

When the discussion has sufficiently covered a wide range of areas, have learners begin planning out what the different event blocks will have 'responsibility for what is the goal for each event, one might control the lights for the feet, one might control the movement of the legs, etc. or, one might control all the lights or all the movements. This discussion, before coding, will allow for the consolidation of understanding of parallel programming, particularly when different class groups are taking part in the information exchange.

It may be that the planning will not be complete after the first block of time for a lesson. Learners need to be sure to save any plans for their code, if they are using paper to record their plans, the plans need to be kept for the next session. If you have planned for a double block, allow for the planning to continue until learners can explain what they want to create and how they want to create it. Groups must be confident with their plan and should be able to summarise the eventuality of the code to you before any actual coding starts.

As learners complete their planning, allow them to start writing and testing their code. Emphasize the usefulness of testing individual blocks to ensure that they return the desired result. Remind learners that testing single blocks makes it easier to find problems rather than initially testing events that are working in parallel.

Below are some examples of blocks that might be used for this lesson.

And this is the mix that could be used for learners to time their actions: disco music.

Support

Highlight the blocks with values that can be edited, particularly the repeat block, the movement block, the wait block. Model, with learners, the effect that changing these values can have on the outcome of the code. Encourage problem solving, trial and error is important to get things as you want. Mistakes are expected and should be welcome.

Activity

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 questions about differences between the design of different groups' code. If a group chose to explore any extension activities, allow for time to explain this.

Suggested questions you might ask:

  • How did you make sure that different actions didn't interfere?
  • How did you test, or check, to ensure the different actions could occur at the same time?
  • Which lights were your favorite to code with?
  • Can anyone think of ways to improve their code after looking at others' ideas?

Carry out any end of lesson routines.

Log off devices and clear everything away.