Return to Pattern Library
GPIO
Blink an LED
Requires the Temboo extension.
Platform

Nordic

Open in VS Code
Drive a GPIO pin high/low on a fixed interval to blink an LED, confirming toolchain, flashing, and basic runtime execution.
Applies when
Use this pattern early in a new project or when validating a fresh dev environment/toolchain setup on Nordic boards supported by nRF Connect SDK (nRF52, nRF53, nRF54, etc.) before attempting more complex peripherals.
Show pattern details
Hide pattern details
Intent
Implement firmware that configures a GPIO pin as digital output and toggles it on a fixed interval (e.g. 500ms) to blink an attached LED, confirming the build/flash/run pipeline and basic timer or delay loop functionality work end-to-end on the target.
Expectation
The onboard or externally wired LED visibly blinks at a consistent, observable interval once firmware is flashed and running, with no crashes, resets, or watchdog timeouts during continuous operation.
Success criteria
LED (or GPIO signal) toggles at the configured interval for at least 10 consecutive cycles with no unexpected resets, panics, or watchdog resets. Observed interval is within +/-20% of the configured value.
How it is verified
Flash the firmware and observe the physical LED for at least 5-10 toggle cycles. Cross-reference RTT or UART console timestamps against the expected interval to confirm timing accuracy within reasonable tolerance (+/- 20%). If no physical LED is available, use a logic analyzer or oscilloscope on the GPIO pin, or fall back to console log timestamps as the primary evidence source.