Page 1 of 1

Motion sensor listener

Posted: Thu Sep 08, 2016 2:11 pm
by mpatronska
Hello,

I tried the example shown in https://www.reddit.com/r/pi4j/comments/ ... r_example/

However the program does not output anything. I also tried the GpioMotionSensorComponent which comes with pi4j-device, but the behavior is the same.

When using the python example from https://www.raspberrypi.org/learning/pa ... worksheet/ - it is printing "Motion detected".

Do you know what is wrong with the Java sample? Thank you.

Re: Motion sensor listener

Posted: Thu Sep 08, 2016 4:50 pm
by DougieLawson
Are you running the latest version of Pi4J from 27th July? http://pi4j.com/

Try the examples from http://pi4j.com/example/more.html and https://github.com/Pi4J/pi4j/tree/maste ... /main/java rather than something old that you found on Reddit.