Placeholder for our stuff related to Telecom, IT, Internet of things (IOT), ESP8266, Raspberry Pi

Raspberry Script to auto turn on and off Monitor Screen using PIR motion sensor

You will need a PIR sensor like this

PIR motion sensor

Make a file named

Place the script in /usr/local/bin and make it executable

sudo chmod +x /usr/local/bin/

Now make another script with name This will start/stop our service at boot time.

Place this file in /etc/init.d and make it executable.

sudo chmod +x /etc/init.d

Now we'll register the script to run on boot.

sudo update-rc.d defaults

As the script is not running at this time, we'll start it

sudo /etc/init.d/ start


All the best for your site!


© 2019 Suresh Hariramani