Blink LED

The classic example of a simple blinking LED

See the component article on this website about the LED.

Blinking LED

Hardware Required

diagram for blinking LED

from microbit import *

while True:
    pin0.write_digital(1)  # on
    sleep(100)
    pin0.write_digital(0)  # off
    sleep(100)
Share On
Facebook Twitter Google Plus

Published: December 23, 2016 Updated: December 23, 2016

Blink LED

How to Blink an LED on the Microbit.

Jez Dean
Teacher