# Chapter 2 is out: Button + LED on the Pico in Ada!

**URL:** <https://forum.ada-lang.io/t/chapter-2-is-out-button-led-on-the-pico-in-ada/4276>\
**Category:** Releases\
**Tags:** embedded, ada, pi-pico, raspberry\
**Created:** [March 20, 2026, 6:27pm UTC](https://forum.ada-lang.io/t/chapter-2-is-out-button-led-on-the-pico-in-ada/4276 "2026-03-20T18:27:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![krischik](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/krischik/32/420_2.png) [@krischik](https://forum.ada-lang.io/u/krischik)\
**Post date:** [March 20, 2026, 6:27pm UTC](https://forum.ada-lang.io/t/chapter-2-is-out-button-led-on-the-pico-in-ada/4276/1 "2026-03-20T18:27:25Z")

</div>

Hi everyone!

Chapter 2 of my Raspberry Pi Pico + Ada tutorial series is now live: **Button & LED** – two working sketches that turn a simple LED into a responsive switch and a proper toggle-style table lamp (with software debounce).

Both examples worked first time — a nice change after some runtime experiments in Chapter 1 😄

- Direct port of the Freenove C example (on while pressed)
- Table lamp version (press once to toggle, with debounce)

Full write-up, Ada source, photos, GNATdoc links and Alire crate here: [Chapter 2 – Button & LED · Pi Ada Tutorial](https://pi-ada-tutorial.sourceforge.io/pico_ada_c02_button_and_led/)

Repository: [Pi Ada Tutorial - Browse /Alire at SourceForge.net](https://sourceforge.net/projects/pi-ada-tutorial/files/Alire/)  
Alire crate (soon): pico\_ada\_c02\_button\_and\_led

Feedback, questions and pull requests very welcome — especially if you spot ways to make the Ada code even more idiomatic!

Next chapter is already in the pipeline… and yes, I’m planning to turn that LED bar into a proper red Cylon eye scanner 😉

Cheers, Martin
