I was trying to write a simple Python to detect the motion sensor output and print a message on the screen.
My connection was like below:
Raspberry Pi model B+
VCC of sensor: 5V (Pin 2) of Pi GND of sensor: GND (Pin 6 on Pi) Output of sensor: GPIO2 (Pin 3 on Pi)
am using the GPIO.BOARD congugration and I directly set my Pin 3 as input
When I read from this pin, it is always HIGH (Really surprising!)
Now I just change the connection as below
VCC of sensor: 5V (Pin 2) of Pi GND of sensor: GND (Pin 6 on Pi) Output of sensor: GPIO17 (Pin 11 on Pi)
I just change a variable called sensorpin in my code to 11 an everything works as expected!!!!
I do not understand what is the difference between using pin11 and pin3.... while both should have functioned as GPIOs.
Can anyone please help?