source
pico_ada_c03_led_bar
1.8.0Chapter 3: Cylon LED Bar: flowing light upgraded to a menacing scanner
1.8.0
Building a smooth flowing LED bar on the Raspberry Pi Pico with Ada - from a simple chasing light to a proper menacing Cylon scanner effect using real-time delays.
In this chapter we turn ten LEDs into a flowing light bar. We start with the basic Freenove example using an array of RP.GPIO.GPIO_Point (aliased limited tagged types). We then improve it with a pre-calculated sine-harmonic timing table to create a realistic Cylon scanner - all done with Ada.Real_Time and zero floating-point at runtime for perfect jitter-free movement.
Contained in Chapter 03 are:
- Sketch_03_1_Flowing_Light - straight port of the classic flowing light
- Cylon_Light - the final dramatic Cylon scanner with organic easing
- Cylon_Light_Float - Floating point version of Cylon_Light
Read the full tutorial at Chapter 3 - Cylon LED Bar: flowing light upgraded to a menacing scanner, GNATdoc documentation, SourceForge repository
(The Cylons did nothing wrong. Humans created the perfect companion species and then completely messed it up.)