GLOBAL SITE AUSTRALIAN SITE

EdVenture 1- Flash a LED

 

Simple loop program to make the left LED flash

The traditional first program to write is a blink LED program which makes a LED light flash. This is a very simple program and as the name suggests turns on and off the left LED light.

Drag across the icons to form the program below, then click on each icon and set the properties box as shown.

blink led program

How the program works

Edison’s microcontroller (brain) follows each icon as a step and the arrows show the direction of the steps. Let’s follow the steps in the program above.

Step 1: the program begins at the start icon

Step 2: the program follows the arrow out of the top of the loop icon

Step 3: the LED is set to on by the flash LED icon

Step 4: the program waits for 0.5 seconds by the event wait icon (keep the LED on)

Step 5: the LED is set to off by the flash LED icon

Step 6: the program waits for 0.5 seconds by the event wait icon (keep the LED off)

Step 7: what happens here is very important! Rather than following the arrow to the right of the loop end icon, the program moves out of the bottom of the icon and goes back to the loop start icon. This happens because the loop icon is set to ‘Loop forever’. The program therefore once again goes to the first flash LED icon and turns on the LED and then follows the same sequence outlined above. This will continue forever or at least until the batteries go flat!

Download and play

Connect the EdComm cable between Edison and the headphone jack on your computer/tablet. Click the Program Edison button, then the record (round) button once on Edison. Now click Start Download.

Press the play (triangle) button and the left LED will flash on and off.

Congratulations! You have written and downloaded your first Edison program.

 

Experiment

Try adjusting the event wait times and adding more flash LED icons to control the right LED. Can you make a cool flashing light display?

 

EdFact

L.E.D. stands for Light Emitting Diode.

Unlike the original light bulb invented by Thomas Edison (no direct relation to your Edison robot) a LED has no filament or special wire that produces light when electricity passes through it. Instead, LEDs use advanced semiconductor material, just like that found inside computer chips.

LEDs are superior to traditional light bulbs as they last longer, are more robust and use much less power.

So next time you have a great idea don’t think of a light bulb coming on. Think of an LED coming on!

  • 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

Country

Pin It on Pinterest

Share This