I am using raspberry pi B+ board. I have joined up an infrared sensor to GPIO 12. I want to use python to query this value, but I am getting "none" instead of a value.
This is the code I am using:
import RPi.GPIO as GPIO GPIO.setmode(GPIO.BOARD) GPIO.setup(12,GPIO.IN) value = GPIO.input(12) print value