User avatar
DeanC
Posts: 136
Joined: Thu Sep 26, 2013 4:07 pm
Location: Vancouver, Canada

GPIO button input

Fri Jan 03, 2014 3:25 am

Looking to add an external button to the RPi for programming.

Can I just hook up pin 1 (3V3) to the button, and the button to the GPIO pin? Or do I need a resistor in between?
We 'idiot proofed' the world, and now it's full of idiots!

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: GPIO button input

Fri Jan 03, 2014 3:29 am

DeanC wrote:Looking to add an external button to the RPi for programming.

Can I just hook up pin 1 (3V3) to the button, and the button to the GPIO pin? Or do I need a resistor in between?
Better to hook up the button from the GPIO to ground and turn on the pullup for that GPIO.

User avatar
rpdom
Posts: 17556
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: GPIO button input

Fri Jan 03, 2014 6:10 am

ame wrote:
DeanC wrote:Looking to add an external button to the RPi for programming.

Can I just hook up pin 1 (3V3) to the button, and the button to the GPIO pin? Or do I need a resistor in between?
Better to hook up the button from the GPIO to ground and turn on the pullup for that GPIO.
I would also put something like a 1K resistor between the button and GPIO, just in case the GPIO gets set to output at any point. (By another program or something).

Return to “Beginners”