I need to connect a pushbutton to my arduino for increment purpose:
So what I need is when I push the button once, the value reflecting in the LCD will increase by 1. If I press the button again, the value will increase by 1 again until it reaches a certain value where it goes back to the minimum value again..
Actually I understand that how we want the pushbutton to act depends on how we code..But got confused when I saw a few examples online where the analogue pin was connected to the pushbutton..
So what is there any difference in connecting the pushbutton to digital pin and analogue pin?
is there any difference in connecting the pushbutton to digital pin and analogue pin?
Not much. You can use the analogue pins in a digital mode analogue 0 being pin 14 1 being 15 and so on.
Or you can do an analogue read, it takes much longer that a digital read but is still only 0.1mS so you won't notice the difference.