Connecting a PIR to a Raspberry PI

Most sensor boards use 3 leads. positive, negative and signal. You will want to hook the signal line up to a GPIO pin.
First you might need to change the direction of your desired GPIO pin. For example:
gpioctl -c 30 IN
For a switch you want IN for an LED your would want OUT.

You can observe your switch in action with gpioctl -l. It should toggle (pin 30 for example) between 1 and 0 for value.
 
Why do you need a PiFace Digital to hook up a GPIO sensor. Read the instructions aragats so helpfully linked to.
Someone enters the sensors field of view = 1
Nothing in sensor view =0
So this is a simple digital IO signal with high/low.
You could hook it to any Pi GPIO pin. Nothing extra needed. It draws so little you can power it from the Pi power pins.
 
Back
Top