Welcome to the DFRobot blog
:
www.dfrobot.com/blog-tag-microbit.html
24
/
86
STEP 3: You will also need to keep the external LED on for 1 second and off for another second in a
sequence. To do this, go to “Basic” and select “Pause (ms) (100)”. The "Pause" function keeps the
same status lasting for a certain period of time.
STEP 4: Put the “Pause” function into “forever” loop and adjusting the numbers.
Combine all the function blocks listed above altogether, we will have the final program as below.
In this picture: set
“
pin P1
”
as 1 (LED on) and
“
pause(ms)
”
as 1000, pin P2 as 2 (off) and
“
pause(ms)
”
as 1000, and the program inside the “forever” loop will be running repeatedly in a sequence.
Exercise
You may have heard the SOS emergency signal. Why not invite your classmates to learn and try to
program it!