i want to count how many time push button pressed, for this i used state change detection of example in arduino IDE softeare with my nodemcu. i just change input pin number , on uploading when i press push button i show well as coded " on push button press 1" but when i press second time push button it not counting and showing on serial monitor.
any one can help me what is the problem..
please see attached file..
Asif138:
is it necessary to use pull down resistor?
If you don't there's no guarantee that the pin is low when the button isn't pressed, and if it's not, then pressing the button won't cause a transition.
(I'm not saying the lack of resistor is your problem necessarily, but it ought to have one, and putting one in removes one possible cause of the problem.)