hey guys....i dont have any code as of yet....i need to be able to count the number of button presses (single button) and then input that number in to a variable.....i can get a basic press counter working but need to be able to input that number elsewhere in the sketch....any thought!!
Reading a button was probably the first exercise in Microcomputer science almost 50 years ago.
Either You use a button library or You understand that mechanical buttons are "jumping" On, Off, On, Off many times during some 10 - 20 milli seconds, and take action Yourself, if needed.
Knowing that a button reading input read a high when the button finally has settled down but when the button is not activated the controller input is floating, reading more or less the weather.
State change detection tutorial. Non-blocking press count.
groundFungus:
State change detection tutorial. Non-blocking press count.
Brrrr, Fritzing diagram.... Okey, readable this time.....
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.