@Mikgabo said in Help! Probem using PIR Sensor on raspberry pi zero to turn on/off screen:
My major problem is getting my PIR sensor to function properly. I have it working properly on a pi3 but not the zero.
What code did u use for your PIR?
for the Pi Zero use the PIR script from @cruunnerr --> point 2.2 Using PIR script
maybe this is helpful
The very important thing is, that your monitor supports HDMI-CEC or ARC. Otherwise u will not be able to turn it on or off via HDMI.
To reassure you, most monitors do this ;)
To check if it works just go into terminal via ssh and type:
sudo tvservice -o to turn off
sudo tvservice -p to turn on
edit: for some monitors the following commands work better. Please use them if your monitor needs it:
vcgencmd display_power 0 to turn off
vcgencmd display_power 1 to turn on