Code a guard dog

Let’s get the Edison robot to patrol a room, like a guard dog, sounding an alarm if it detects a potential problem!

Get the materials for this lesson

You will also need to use the EdBlocks programming app.

About this lesson

Recommended time

55 minutes





Grade levels

Year 2 – Year 6

Code a guard dog - an Hour of Code activity

Introduce the key computational concepts of loops and conditionals using Edison robots and the block-based programming language EdBlocks. This lesson utilises the Edison robot’s infrared (IR) light sensors through a set of progressive programming tasks. Students apply sequential programming and decomposition to the challenges while exploring how robots can sense and react to the world.  

This 1-hour lesson is designed to allow students to work independently as they discover:

  • What is infrared light?
  • How does Edison use infrared light?
  • What are loops?
  • How can Edison patrol, detect and alert?

Celebrate student success!

Recognise your students’ achievements in taking on an Hour of Code challenge with Edison robots by presenting them with a certificate of completion.


Is this your first time using Edison?

If this is your first time using Edison or EdBlocks, there are a few extra things you need to know. This Getting started with Edison and EdBlocks set will help you get the most out of Edison, EdBlocks and this activity. Inside you will find:

  • step-by-step help for setting up your robots and programming devices plus
  • a hands-on introduction activity for students.
  • Keep up with Edison

    Sign up for our newsletter to get all things Edison delivered straight to your inbox.

  • This field is for validation purposes and should be left unchanged.

Heads up

The Australian Federal Parliament has passed a law that extends goods and services tax (GST) to low value imports of physical goods imported by consumers from 1 July 2018.

This means that all customers purchasing Edison robots and accessories with an Australian shipping address must now pay GST. The GST will be automatically added to your purchase and show as a line item on your invoice.

We've detected that you are in Australia, so we wanted to let you know that we have changed your settings to view our Australian site, which displays GST inclusive pricing.

You can change back to the GLOBAL SITE at any time using the link in the top left of the page.

OK got it!    Take me to the GLOBAL SITE instead

Pin It on Pinterest

Share This