I am having trouble with the GPIO pins on my two raspberry pis. I am working on a project that someone has worked on previously. The person set the same code for the button for both pis. Both pis utilize the code:
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(21, GPIO.OUT, initial=1)
GPIO.setup(16, GPIO.IN, pull_up_down = GPIO.PUD_UP)
time.sleep(2)
while True:
if(GPIO.input(16) == 0): print "Hello"
GPIO.cleanup()
When I run this code, the pi on top works; however, the pi on the bottom does not. Am i using the correct GPIO pins for the second? What should the GPIO pins on the bottom be?