pb pbaumgarten.com
Courses Python Reference GPIO LED
Login
Course
Python Reference
Topic
MicroPython
Python Reference

GPIO LED

import machine, time

# Using GP28
led = machine.Pin(28, machine.Pin.OUT) 
while True:
    print("blink!")
    led.on()
    time.sleep(0.2)
    led.off()
    time.sleep(0.2)