Nucleo blink
The STM32 Nucleo-F411RE’s green LED on D13 and an LED beside the board, which light when the pin is HIGH, as on an Uno. The whole build, an STM32 Nucleo-F411RE 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 $16.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: the smallest thing a board can do.
//
// The Nucleo's green LED LD2 hangs off D13, which is the STM32's PA5, through
// a resistor to ground, so HIGH lights it, as on an Uno. LED_BUILTIN, 13, D13
// and PA5 all name the same pin here.
//
// delay() parks the core on WFI between SysTick ticks rather than spinning, so
// this sketch costs the simulator almost nothing while it waits.
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // lit
delay(500);
digitalWrite(LED_BUILTIN, LOW); // dark
delay(500);
}
Parts list
4 parts, plus the jumper wires. They retail for about $16.15; on Mokxi they're free.
- 1 × STM32 Nucleo-F411RE
- 1 × Half breadboard
- 1 × Resistor, 220 Ω
- 1 × LED, green
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: STM32 Nucleo-F411RE pin GND; LED, green pin C
- STM32 Nucleo-F411RE pin D13; Resistor, 220 Ω pin 1
- Resistor, 220 Ω pin 2; LED, green 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.