Go Down

Topic: analog alarm and value replacement (Read 116 times) previous topic - next topic

Delta_G

Also, since lastbutState never changes in your program, it is hardly keeping up with the last button state.  You need a line somewhere at the end that says:

Code: [Select]
lastbutState = butState

So lastbutState will have in it the old button state when the loop repeats.
Ad hoc, ad loc, and quid pro quo.  So little time - so much to know!  ~Jeremy Hillary Boob Ph.D

PaulS

Quote
You need a line somewhere at the end that says:
Well, one like that, anyway. One with a semi-colon on the end, perhaps?  8)


Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy