- Tue Jan 05, 2016 10:34 am
#37970
Barnabybear wrote:Check this out https://www.hackster.io/iboboc/smartbutton-pro-06ce5d , sounds like you doing something simlar.
Thanks for this Barnabybear! Yes, this is very similar to what I want to do, although I'll add that I don't fully understand why some of the circuit in this example is setup as it is.. Two questions come to mind:
1. it seems that the person is treating GPIO0 the same way as CH_PD in this sketch. Couldn't they just permanently have GPIO0 pulled HIGH? It's not using power as long as CH_PD is low, correct?
2. This is more of a (very) basic EE question, but one concept I don't fully understand is how, despite the CH_PD being connected to GND through a resistor, CH_PD is pulled HIGH when connected to VCC. In other words, and at the risk of sounding really stupid, I don't quite understand how to figure out why CH_PD isn't pulled low even when the button is pressed, because it is still connected to ground (albeit through a resistor!). And, for example, could a resistor be used between VCC and CH_PD? In the past I've used 4k7 (thanks to Martin's) to pull up/down GPIO pins as needed, including CH_PD, but in the schematic shown the person us connecting directly to vcc. I imagine there is a "fight" between GND and VCC, and the resistor causes GND to "loose" and the CH_PD pin to be pulled high, and perhaps adding a resistor between VCC and CH_PD would cause a less certain outcome?
Anyway, thank you!!