Built-in project · Waveshare RP2040-Zero
RP2040-Zero NeoPixel
The Waveshare RP2040-Zero fades its own NeoPixel on GP16 around the color wheel. The whole build, a Waveshare RP2040-Zero, runs here in your browser on the firmware below; open it in the editor to change the wiring or the code and run it again.
Teaching? Assign it to your class in one click.
Beginner Runs in your browser. Free, and no account needed.
The parts retail for about $4. On Mokxi they're free.
Click to open it in the editor
The circuit itself, running here on the simulator. Press what can be pressed; click anything else to open it in the editor.
The code
The firmware exactly as the editor opens it. Change a line there and press Run: it compiles in the browser.
sketch.ino · Waveshare RP2040-Zero
// NeoPixel: the RP2040-Zero's own RGB LED.
//
// The only lamp on this board you can drive is a WS2812 on GP16
// (PIN_NEOPIXEL). There is no plain LED and no LED_BUILTIN.
#include <Adafruit_NeoPixel.h>
Adafruit_NeoPixel pixel(1, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800);
void setup() {
pixel.begin();
pixel.setBrightness(60);
}
void loop() {
for (long hue = 0; hue < 65536; hue += 2048) {
pixel.setPixelColor(0, pixel.ColorHSV(hue));
pixel.show();
delay(40);
}
}
Parts list
1 part, plus the jumper wires. They retail for about $4; on Mokxi they're free.
Change it and keep it
Open it in the editor, change the circuit or the code, and keep your version in a free account.