Introduction
A light-emitting diode (LED) is a semiconductor device that emits light when an electric current passes through it.
In this guide, you will learn to connect a single external LED to the micro:bit and program it in Makecode.
Complete this guide to learn how to use an external LED with the micro:bit!
Tools
-
-
-
-
-
-
-
basic.forever(function () { pins.digitalWritePin(DigitalPin.P2, 0) basic.pause(500) pins.digitalWritePin(DigitalPin.P2, 1) basic.pause(500) })
-
led.enable(false) basic.forever(function () { pins.digitalWritePin(DigitalPin.P3, 0) basic.pause(500) pins.digitalWritePin(DigitalPin.P3, 1) basic.pause(500) })
-