# Click button "if statement"

**URL:** <https://forum.arduino.cc/t/click-button-if-statement/1220420>\
**Category:** LEDs and Multiplexing\
**Created:** [February 5, 2024, 8:48pm UTC](https://forum.arduino.cc/t/click-button-if-statement/1220420 "2024-02-05T20:48:08Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![J-M-L](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/j-m-l/32/766245_2.png) [@J-M-L](https://forum.arduino.cc/u/J-M-L)\
**Post date:** [February 5, 2024, 9:07pm UTC](https://forum.arduino.cc/t/click-button-if-statement/1220420/5 "2024-02-05T21:07:20Z")

</div>

That’s what button libraries do  
Or study the state change detection examples from the IDE

you might benefit from studying state machines. Here is a small introduction to the topic: [Yet another Finite State Machine introduction](https://forum.arduino.cc/t/yet-another-finite-state-machine-introduction/1198997)

---

_[View the full topic](https://forum.arduino.cc/t/click-button-if-statement/1220420)._
