Read the statement by Michael Teeuw here.
MMM-PIR-Sensor wont do anything
-
This is really bugging me! Ok, I am new to Pi programming but I have knowledge of a few programming languages and can usually tweak my head around problems but this has really stumped me!
I turned the PIR sensor away from me to show no movement. When I use “sudo ./test.sh” I get a load of 0’s on the screen displaying no movement. When I wave my hand in front I get a load of 1’s. So its working correctly.
I setup MMM-PIR-Sensor and change the pin from default to number 7 in the config file. Nothing happens on the screen. It doesn’t switch off when it senses no movement (like its supposed to)
This is my test.sh code (which works):
echo "4" > /sys/class/gpio/export echo "in" > /sys/class/gpio/gpio4/direction while true; do trap 'echo "4" > /sys/class/gpio/unexport' 0 stat=`cat /sys/class/gpio/gpio4/value` echo $stat done exit 0And my config code:
{ module: 'MMM-PIR-Sensor', config: { sensorPIN: 7 } },I just know its something simple but I am stumped!
-
@TS77UK said in MMM-PIR-Sensor wont do anything:
echo “4” > /sys/class/gpio/export
Ignore that! I was looking at the wrong pin map for my model Pi! I should have been in number 4 not 7! As soon as I typed it I realised the answer lol
Thank you for your time
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login