MagicCode Lesson 4
Blinking a LED
Learn how to blink a LED
Magicbit equipped with four onboard leds in Magicbit development board, Lets select yellow LED (which is wired to D18)
By setting output state to high of LED pin will turn on the led and by setting output state to LOW will turn of LED.
Drag and Drop following blocks from Events, control and MagicBit lists of the block palette and make the script.
This program starts by clicking the Green flag. The forever block continuously runs the code held inside the block. The digital pin has set to pin 18 because Yellow Led has connected to the D18 pin on the board. The waiting time has set to 1 second. According to the Script, the Yellow LED turn on for one second and turn off for one second continuously.