EdVenture 7 – Watch out! There’s an obstacle!

Let’s do some autonomous driving

Edison is equipped with an obstacle detector, so he can see obstacles in his path and avoid them. Here’s a simple program that does this.

obstacle avoiding program

How the program works

Before entering an endless loop, the program turns on Edison’s obstacle detection system. Edison now emits infrared (IR) light from two light emitting diodes (LEDs), one on the left and one on the right. In between the two LEDs is an IR sensor. The sensor detects when IR is reflected from an obstacle. If the IR is reflected from the left LED then the obstacle is on the left. If the IR is reflected from the right LED, then the obstacle is on the right.

The IF icon asks; ‘have any obstacles been detected’? If the answer is no, then the cross path is taken and Edison drives forward. If the answer is yes, then the tick path is taken and Edison spins left for 0.1 of a second (100 milliseconds). See next page for calibration.


Try detecting for obstacles on the left and right. See if you can add more IF icons and have Edison spin left to avoid obstacles on the right and spin right to avoid obstacles on the left.


I’m sure you’ve heard of, or even seen, robot vacuum cleaners; well they use the same IR system as Edison to detect obstacles. The ‘Roomba’ has two of these sensors. One is used just like Edison to detect obstacles, and the other is used as a ‘cliff detector’ and looks at the ground in front of the robot to ensure it isn’t about to dive down a staircase.

  • 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