Skip to main content

Ravenscar

2026


Chapter 5: Controlling an RGB LED with PWM

Extend the simple LED examples to full-colour control with an RGB LED. Create a reusable Pico.Analog.RGB_LED package and explore two sketches: random colours (using the embedded runtime) and a smooth colour-wheel transition.

Chapter 4 – Analog & PWM

In this chapter we create a reusable Pico.Analog package for PWM-based analogue output. We start with a classic breathing light, then move on to a flowing light bar. Along the way the MSO-5102B reveals the real behaviour of our code, and we discover (and fix) a subtle bug in the experimental RP2350 HAL.

Chapter 3 - Cylon LED Bar: flowing light upgraded to a menacing scanner

·
In this chapter we turn ten LEDs into a flowing light bar. We start with the basic Freenove example, then improve it with a sine-harmonic timing table to create a realistic Cylon scanner effect. All code is written in Ada and runs on the RP2040 without floating-point at runtime.

Chapter 2 – Button & LED

·
In this chapter I combine a push button with an LED. We start with basic on/off control, then move to a toggle-style table lamp with software debounce.