Testing Grove PIR motion sensor on Raspberry Pi

I’ve recently bought two grove PIR motion sensors and I’d like to use from a Raspberry Pi.

Looking at your git code (link removed because as new user I still can not post a link) it seems to me no one is testing the return value of isDetected() function and it always print “PIR sensor detected some stuff”.

That said, I’m not able to test your PIR motion sensors even with other working code, such as that one at this link:
(link removed because as new user I still can not post a link, search for raspberry pi parent detector)

I’ve connected VCC on pin2 of Raspberry Pi, GND to pin6 and D1 to pin7 and run the following python code:

[code]import RPi.GPIO as GPIO
import time

sensorPin = 7

GPIO.setup(sensorPin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)

prevState = False
currState = False

while True:
prevState = currState
currState = GPIO.input(sensorPin)
if currState != prevState:
newState = “HIGH” if currState else “LOW”
print “GPIO pin %s is %s” % (sensorPin, newState)[/code]

I’m not able to detect a movement (I have tested your and my code with both my two Grove Pir motion sensors)
Do you have any suggestions for me and my Raspberry setup ?

I’ve solved connecting the Raspberry Pi and the Grove Pir motion sensor through the Sparkfun PiWedge.

Am I not authorized to connect directly the wires of Grove Pir motion sensor to the GPIO of Raspberry Pi ?