Blink an LED
Blink the on-board LED. Change the pin number to match your board (ESP32 boards often use 2; Raspberry Pi Pico uses "LED").
A starter program from the MantisIDE Full IDE (Tools › Examples). Press Open in Full IDE to run it on your board, change it, and save it as your own.
# Blink the on-board LED. Change the pin number to match your board
# (ESP32 boards often use 2; Raspberry Pi Pico uses "LED").
from machine import Pin
import time
led = Pin(2, Pin.OUT)
while True:
led.value(not led.value())
time.sleep(0.5)
Comments