RGB LED
The nXPico M has a single WS2812 NeoPixel LED wired to GPIO23 (LED / NEOPIXEL).
Using the led module
Section titled “Using the led module”The led module ships with the board firmware and provides a simple class with named color shortcuts.
from led import Led
rgb = Led()
rgb.red()rgb.green()rgb.blue()rgb.white()rgb.yellow()rgb.cyan()rgb.magenta()rgb.orange()rgb.off()Custom color
Section titled “Custom color”Pass an [r, g, b] list with values in the 0–255 range:
rgb.set_color([255, 128, 0]) # warm orangeRead current color
Section titled “Read current color”print(rgb.get_value()) # e.g. [255, 128, 0]See the Led API reference for full method details.
Using neopixel directly
Section titled “Using neopixel directly”If you prefer to skip the wrapper:
import neopixelfrom machine import Pin
np = neopixel.NeoPixel(Pin("NEOPIXEL"), 1)np[0] = (255, 0, 0) # rednp.write()