I am planning to use the Puck's GPIO pin to detect if a switch is open (it will be closed most of the time), however I was wondering if the GPIO pin mode will affect the battery drain? My original idea is to connect the switch to both a GPIO pin (as input, pull down) and the 3V pin. But is there a better design that will save more power?
What you're suggesting sounds fine and shouldn't draw much power. All GPIO pins should be about the same.
The only problem is if your switch is 'normally closed' rather that the usual 'normally open' type (which could cause the pulldown resistor to be drawing power all the time) - but that is very unlikely
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem