0

How would I go about using a raspberry pi to play a video, every time the user is "in front of" the screen (detected by a PIR sensor).

Ideally, the screen would be blank, until the sensor is triggered, then a fullscreen video will play with sound, before returning to black.

  • 2
    Write some python code to detect a signal on a GPIO pin from the PIR sensor, then use the omxplayer-wrapper to play the video. Use the pygame library to clear a black screen. – CoderMike Sep 27 at 10:56
  • @CoderMike I would make the comment an answer. I would upvote it. – Ingo Sep 27 at 16:58
  • Halloween project? – Chad G Sep 27 at 21:28
  • Yes, Chad! Will report back how it goes! – Pez Cuckow Sep 28 at 21:39
1

Write some python code to detect a signal on a GPIO pin from the PIR sensor, then use the omxplayer-wrapper to play the video. Use the pygame library to clear a black screen.

  • omxplayer-wrapper was the part I was missing thank you! – Pez Cuckow Sep 28 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.