# Programming limit switch?

**URL:** <https://forum.arduino.cc/t/programming-limit-switch/1368203>\
**Category:** Programming\
**Created:** [March 28, 2025, 6:10am UTC](https://forum.arduino.cc/t/programming-limit-switch/1368203 "2025-03-28T06:10:45Z")\
**Posts on this page:** 1\
**Showing post:** 69

<div class="post-metadata">

**Author:** ![alto777](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/alto777/32/317385_2.png) [@alto777](https://forum.arduino.cc/u/alto777)\
**Post date:** [March 29, 2025, 8:42pm UTC](https://forum.arduino.cc/t/programming-limit-switch/1368203/69 "2025-03-29T20:42:07Z")

</div>

I can't find a post I made that comes at this from a certain angel.

But read this one and maybe more on the thread:

> [@Multiple state machines](https://forum.arduino.cc/t/multiple-state-machines/1246218/13):
>
> @bagpiperdave - I've only noticed for sure now that you are using a timer library. I have nothing against libraries, but in this case it would be good if you set aside some time to learn how you might do without it, even if you continue to use it. This is the essence of the library: // a global object (or static local) is the timer elapsedMillis timeElapsed; // then, wherever in your code // check the timer object if (timeElapsed \> interval) { // here be stuff that executes every int…

and here, same same:

> [@Trying to get millis to work with button](https://forum.arduino.cc/t/trying-to-get-millis-to-work-with-button/1272810/7):
>
> OK. This gets execute once when the button becomes pressed: Serial.println("ON"); lcd.setCursor(0, 2); lcd.print(" ON "); and this gets execute once when the button is released.: Serial.println("Off"); lcd.setCursor(0, 2); lcd.print(" OFF "); If I understand, you could turn on the LED when you print ON, and at the same time start a timer. Recall or learn that starting a timer in this context is simply noting the time. Here we a…

  

After or while… you have look at, code, play with and read about "blink without delay" until you feel that _Aha_! thing.

a7

---

_[View the full topic](https://forum.arduino.cc/t/programming-limit-switch/1368203)._
