Page 1 of 1

Multiple GPIO input

Posted: Thu Oct 30, 2014 6:46 pm
by ankita
Hello,

Please help me!
I want to program GPIO for 2 keys.
I connected a button with the GND and pin 24 and the other to GND and pin 20 are.
The key with 24 works well and output is as expected, but it happens nothing when I press button 20. Also, there are no errors when compiling.
Please take a look at the code , http://pastebin.com/RiDrfaXs

Any help is greatly appreciated!
thanks,

Re: Multiple GPIO input

Posted: Thu Oct 30, 2014 6:48 pm
by joan
Pin 20 is connected to ground. It is NOT a gpio.

Re: Multiple GPIO input

Posted: Thu Oct 30, 2014 7:35 pm
by DougieLawson
joan wrote:Pin 20 is connected to ground. It is NOT a gpio.
The OP's code is using BCM pin numbering. So GPIO24 is pin#18 and GPIO20 is pin#38.