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