Page 1 of 1

GPIO button input

Posted: Fri Jan 03, 2014 3:25 am
by DeanC
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?

Re: GPIO button input

Posted: Fri Jan 03, 2014 3:29 am
by ame
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.

Re: GPIO button input

Posted: Fri Jan 03, 2014 6:10 am
by rpdom
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).