RP2040-Zero blink
An LED on GP0 of the RP2040-Zero, which has no plain LED of its own, with the board beside the breadboard. The whole build, a Waveshare RP2040-Zero and 2 more parts, 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 $9.15. On Mokxi they're free.
The code
The firmware exactly as the editor opens it. Change a line there and press Run: it compiles in the browser.
// Blink: an LED and a 220 ohm resistor from GP0 to GND. The board has no
// plain LED of its own.
const int kLed = 0;
void setup() {
pinMode(kLed, OUTPUT);
}
void loop() {
digitalWrite(kLed, HIGH);
delay(500);
digitalWrite(kLed, LOW);
delay(500);
}
Parts list
4 parts, plus the jumper wires. They retail for about $9.15; on Mokxi they're free.
How it is wired
3 connections, pin by pin, read from the circuit itself. Each line is one set of pins joined together, by a jumper wire or a breadboard strip.
- Ground: Waveshare RP2040-Zero pin GND; LED, yellow pin C
- Waveshare RP2040-Zero pin GP0; Resistor, 220 Ω pin 1
- Resistor, 220 Ω pin 2; LED, yellow pin A
Change it and keep it
Open it in the editor, change the circuit or the code, and keep your version in a free account.