Control onboard LED of Raspberry Pi Pico 2/2W using MicroPython/CircuitPython
The onboard LED on Raspberry Pi Pico and Pico 2 is connected to GPIO25. On Pico W and Pico 2 W, it's connected to the wireless chip. Following are exercise to control the onboard LED using MicroPython/CircuitPython, tested on Pico 2 and Pico 2 W. mpy_rp2_led.py """ MicroPython on Raspberry Pi Pico 2/2W to control onboard LED """ import os, sys import time #import board #from digitalio import DigitalInOut, Direction sys_info_text = sys.implementation[0] + " " + os.uname()[3] +\ "\nrun on " + os.uname()[4] print("=======================================") print(sys_info_text) print("=======================================") led = machine.Pin("LED", machine.Pin.OUT) print("led:", led) # Control onboard led using led.on() and led.off() while True: led.on() time.sleep(0.5) led.off() time.sleep(0.5) """ # Toggle onboard led using led.togg...