Post topics, source code that relate to the Arduino Platform

User avatar
By AlexPilk
#23438 Actually, when the button is pressed it boots up. When GPIO2 is between + and -. If you cannot boot with the pin connected to ground - you need to connect it to the power source, but then it will always stay HIGH whether you press the button or not. And if you connect it to a place on breadboard where it won't be pulled to - or +, but high when the button is pressed - it will also stay high when the button is not pressed. So how do I set it up to boot and function correctly?
User avatar
By martinayotte
#23440 I'm not understanding exactly what you wish to do ...
The GPIO2 needs to be HIGH at Reset/PowerUp for normal boot.
If you wish that your software do something different when button is pressed, don't press button at power up but simply after, for example, during the first 5 seconds following the normal boot.

EDIT : I've look back to your wiring diagram, I see that the button is at VCC and there is a PullDown to GND. It should be reversed instead : PullUp to VCC and button to GND.
User avatar
By martinayotte
#23509 Nope ! In your latest drawing you are actually shorting the GPIO to VCC.
Simply switch resistor and button on your original diagram, making the button connected to GND and the resistor to VCC, acting as a PullUp.
image.jpg
You do not have the required permissions to view the files attached to this post.