Lesson 9 Worksheet 9.4 – Light following

Write the following program to have the Edison robot follow light from a torch/flashlight.


Shine a torch/flashlight at Edison and the robot will drive towards the light.

This program performs a calculation between two variables. In the calculate word icon the variable Right_Light is subtracted from the variable Left_Light. The result (answer) is placed back into the variable Right_Light. Let’s see what the results would look like:






Torch in right



200 – 100 =


Torch on left



100 – 200 =



From the above you can see that when the torch is to the right the result is below zero (negative number). When the torch is to the left the result is above zero (positive number).

The If icon asks: Is the result less than zero? If true the robot drives left (towards the light), if false the robot drives right (towards the light).

What wold happen if you changed the ‘less than’ symbol (<) to a greater than symbol (>)?



  • 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