Read the statement by Michael Teeuw here.
PIR sensor problem
-
I am trying to add a PIR sensor to the MM
i have wired it to a raspberry pi but having a problem executing the funciton control the lcd
getting an error, an idea
sudo chmod u+s /opt/vc/bin/tvservice && sudo chmod u+s /bin/chvt
chmod: cannot access ‘/opt/vc/bin/tvservice’: No such file or directory -
@sultan-y in raspios latest , bullseye, that function, tvservice, is no longer provided.,
-
is there a workaround?
-
@sultan-y there are other approaches to turn off monitor
some of the newer pie modules support multiple ways
-
@sdetweil said in PIR sensor problem:
some of the newer pir modules support multiple ways
I love this style ;)
-
@sultan-y
To get the PIR sensor working with MM on the currently latest Raspberry PI OS Bullseye you can use/usr/bin/vcgencmd display_power 0/1instead of using the tvservice command (I run it in a script started by crontab at reboot).I also
- added
/usr/bin/xrandr -display :0.0 --autobefore the vcgencmd command - added user Pi to the gpio group:
sudo usermod -a -G gpio pi, and I - added
XAUTHORITY=/home/pi/.Xauthorityhere:sudo vi /etc/environment
My mirror uses a DVI to HMI output, but using
xrandrandXAUTHORITYas above solved the issues I had.Btw, I use
/usr/bin/chvt 6 /usr/bin/chvt 7after the
/usr/bin/vcgencmd display_power 1command, but that was used prior to using Bullseye as well. - added
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