Professional Documents
Culture Documents
PI3 Motion Sensor Script
PI3 Motion Sensor Script
Thanks to https://www.raspberrypi.org/forums/viewtopic.php?t=147311
PIR: https://www.amazon.com/HC-SR501-Sensor-Module-Pyroelectric-
Infrared/dp/B007XQRKD4
1. Install light-locker:
2. Setup light-locker
hdmi_blanking=1
@xscreensaver -no-splash
@point-rpi
@xset s 0 0
@xset s noblank
@xset s noexpose
#!/bin/bash
state=$(cat /sys/class/gpio/gpio4/value)
light-locker-command -p
echo "Wake"
sleep 280
fi
sleep 0.3
done
7. Reboot
sudo reboot