codetimeweb.files.wordpress.com  · Web viewBike Light. Make a bike light by changing the pause,...

5
Lighthouse In this lesson you will make a single LED flash slowly Add a Forever Loop so that the lighthouse runs automatically Set the plot to be 0,0 This is the top left of the LEDs on the Microbit Add a pause to keep the LED on. Remember that this is in milliseconds 1000 milliseconds = 1 second Now clear the screen to turn all LEDs off Now add another pause to keep the LEDs off for 1000 milliseconds = 1 second

Transcript of codetimeweb.files.wordpress.com  · Web viewBike Light. Make a bike light by changing the pause,...

Page 1: codetimeweb.files.wordpress.com  · Web viewBike Light. Make a bike light by changing the pause, making the LED blink more quickly. SOS Message. An SOS message is 3 short blinks,

Lighthouse

In this lesson you will make a single LED flash slowly

Add a Forever Loop so that the lighthouse runs automatically

Set the plot to be 0,0

This is the top left of the LEDs on the Microbit

Add a pause to keep the LED on.

Remember that this is in milliseconds

1000 milliseconds = 1 second

Now clear the screen to turn all LEDs off

Now add another pause to keep the LEDs off for 1000 milliseconds = 1 second

Page 2: codetimeweb.files.wordpress.com  · Web viewBike Light. Make a bike light by changing the pause, making the LED blink more quickly. SOS Message. An SOS message is 3 short blinks,

Run and compile your program on the Microbit

Bike Light

Make a bike light by changing the pause, making the LED blink more quickly

Page 3: codetimeweb.files.wordpress.com  · Web viewBike Light. Make a bike light by changing the pause, making the LED blink more quickly. SOS Message. An SOS message is 3 short blinks,

SOS Message

An SOS message is 3 short blinks, followed by 3 long blinks, followed by 3 short blinks

A short blink is 300 milliseconds. A long blink is 1000 milliseconds

Page 4: codetimeweb.files.wordpress.com  · Web viewBike Light. Make a bike light by changing the pause, making the LED blink more quickly. SOS Message. An SOS message is 3 short blinks,

Challenge 1

1. Change the plot numbers to make another light blink2. Make sense of the plot numbers. Demonstrate this by making the bottom right LED blink3. Make the SOS code more efficient by using repeat 3 times loops4. Try to write a different short message