Pico_ada_c03_led_bar

Website:

https://pi-ada-tutorial.sourceforge.io/pico_ada_c03_led_bar

Author:
  • Martin Krischik <krischik@users.sourceforge.net>
Maintainer:
  • Martin Krischik <krischik@users.sourceforge.net>
License:

GPL-3.0-or-later

Version:

1.3.1

Alire CI:

Dependencies: Dependents:

No dependents.

Badge:

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

#raspberry #pi #pico #rp2040 #tasking #light-tasking #ada2022 #embedded

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.

The two programs included are:

  1. Sketch_03_1_Flowing_Light - straight port of the classic flowing light
  2. Cylon_Light - the final dramatic Cylon scanner with organic easing
  3. Cylon_Light_Float - Floating point version of Cylon_Light

Read the full tutorial (with photos, explanations and GNATdoc) at: https://pi-ada-tutorial.sourceforge.io/pico_ada_c03_led_bar/

GNATdoc documentation: https://pi-ada-tutorial.sourceforge.io/gnatdoc/pico_ada_c03_led_bar/

SourceForge repository: https://sourceforge.net/projects/pi-ada-tutorial/

(The Cylons did nothing wrong. Humans created the perfect companion species and then completely messed it up.)