Skip to content

Latest commit

 

History

History
57 lines (41 loc) · 1.2 KB

microbit-blink-led-example.md

File metadata and controls

57 lines (41 loc) · 1.2 KB
title layout meta-description share author about cats simple-description video date date-updated
Blink an LED with Microbit
text-width-sidebar
Classic example of blinking an LED on the microbit.
true
jez
How to Blink an LED on the Microbit.
component examples
Blink LED
teaser
microbit_blink_led_example
2016-12-23 10:20:00 UTC
2016-12-23 10:20:00 UTC

The classic example of a simple blinking LED

See the component article on this website about the LED.

{:.ui .header .dividing}

Blinking LED

Hardware Required

  • LED
  • 220Ω resistor

{:.ui .image} diagram for blinking LED

{% highlight python %} from microbit import *

while True: pin0.write_digital(1) # on sleep(100) pin0.write_digital(0) # off sleep(100) {% endhighlight %}