|
The Seeed XIAO RP2040 has a NeoPixel. This project uses the Pico C SDK, and the PIO, to animate it.
|
This is not my project. I adapted hutscape's NeoPixel project for the Pico. These are the changes:
- the Pico example uses IO 0 to communicate with the pixel. On the Xiao, it's connected to IO 12
- on the XIAO, the power for the pixel is delivered via IO 11. I have to drive that high.

Source code changes: xiao-neopixel.c
const int PIN_TX = 12;
const int PIN_PWR = 11;
// ...
int main() {
stdio_init_all();
gpio_init(PIN_PWR);
gpio_set_dir(PIN_PWR, GPIO_OUT);
gpio_put(PIN_PWR, 1);
// ...
That's it. Build and run it.
For convenience, I attach my VSCode project folder, including the pre-compiled .uf2 firmware:xiao_neopixel_20240520.zip








