Skip to content

Outputs

Digital outputs

Blinking an LED attached to pin0 (and ground)

Making an beeping sound with PIEZO speaker

from microbit import *

while True:
    pin0.write_digital(1)
    sleep(20)
    pin0.write_digital(0)
    sleep(480)

Analog outputs

Built-in outputs