Pico_ada_c05_rgb

Website:

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

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

GPL-3.0-or-later

Version:

1.6.0

Alire CI:

Dependencies: Dependents:

No dependents.

Badge:

Chapter 5: Controlling an RGB LED with PWM

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

Learn how to drive a common-cathode RGB LED using the RP2040’s PWM peripherals. This chapter introduces a reusable Ada package for colour control and demonstrates both random colours and a smooth colour-wheel gradient.

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.

Contained in Chapter 05 are:

  1. sketch_05_1_random_color_light.adb - Chapter 5.1 Random Color Light
  2. sketch_05_2_gradient_color_light.adb - Chapter 5.2 Gradient Color Light

Read the full tutorial at Chapter 5: Controlling an RGB LED with PWM, GNATdoc documentation, SourceForge repository