Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4447

Beginners • error when using wlr-randr

$
0
0
I am very new to raspberry pi (though I've had one for years, I haven't done much with it and I am looking to change that). I've been playing with an idea I have for Halloween using the pi and a pir. (I got some 1-way mirror and an old monitor that I'll combine as if making a smart mirror and then when the pir detects a tricker treater, it displays a video on the screen that looks like a ghost coming through the mirror.) I've got a 4b fully up to date plugged into the screen using a mini-hdmi-to-hdmi cable and I've got the pir installed and working. (To make things easier on myself, as I've been learning more and more, I've kept each task as a separate script and so for this question, I'm only referencing the part of my script that applies.) What I'm looking to do is blank the screen when there is no motion detected unblank it rotated left, when there is motion. My script seems to work:

Code:

from gpiozero import MotionSensorfrom subprocess import runpir = MotionSensor(12) # out plugged into GPIO12while True:    pir.wait_for_motion()    run('WAYLAND_DISPLAY="wayland-1" wlr-randr --output HDMI-A-1 --on --rotate left',  shell=True)    pir.wait_for_no_motion()    run('WAYLAND_DISPLAY="wayland-1" wlr-randr --output HDMI-A-1 --off', shell=True)
The screen turns off when the pir detects nothing and on rotated left when it does, but I get an error:
wlr-randr: unrecognized option '--rotate'
If I leave off the
--rotate left
the screen doesn't rotate when it turns back on. While I could ignore the error (since everything seems to be working the way I want it to) I feel like I'm missing out on the learning. What am I doing wrong here?

Statistics: Posted by arielzusya — Sun Oct 13, 2024 7:20 pm — Replies 0 — Views 13



Viewing all articles
Browse latest Browse all 4447

Trending Articles