user button configuration
I want to print a msg when i press a user button on the pycom board,
but i get about 92 msgs when i press the button only once !
import machine button=machine.Pin("G17", machine.Pin.IN, machine.Pin.PULL_UP) while(True): if(button.value()==0): print("presssss !!!!")
How can i configure the button so that when i press once only i get a single output(msg)
thanks @RobTuDelft It worked well
RobTuDelft last edited by
Quick solution is to use pull_up resistor like you did and create empty while loop when value is 0.
Then after releasing the button add a small delay, ~100 ms will do. Then add futher statements after the delay.
livius last edited by