1 minute read

Pedestrian signal with flashing light

Next Article
LED

LED

Let's start the second part of the task.

trafficlight2.hex

After the 5 seconds is complete, the green lamp should flash three times. The flashing frequency is 1 second. Then the light is switched to red.

Here, you will use the command “repeat x times” from the “Loops” block. Dock it after the 5 second pause.

Change the repetitions from “4” to “3”.

Add a 1 second pause. Then the command “digital write pin P12 to 0” follows.

Then another 1 second pause command follows, and the command to switch on the P12.

After the write command, add a 1 second pause command.

Now the second part of the task is programmed. Save the file on your computer. Test it out virtually, then test it a second time on your model.

This article is from: