From facbb5cbfacc49fc56d776583e058782f05bd882 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 23 Feb 2023 13:29:15 +0800 Subject: [PATCH] more screensavers --- server.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/server.py b/server.py index ed7da0d..2d43ca4 100755 --- a/server.py +++ b/server.py @@ -678,16 +678,28 @@ def screensaver(): if "Pulsating Colors" in data: - screensaver_p = pexpect.spawn("sudo -E python3 ./rpi-rgb-led-matrix/bindings/python/samples/pulsing-colors.py --led-gpio-mapping=adafruit-hat --led-slowdown-gpio=4 -r 32 --led-cols 64 -c 2 -P 1") + screensaver_p = pexpect.spawn("sudo -E python3 pulsing-colors.py --led-gpio-mapping=adafruit-hat --led-slowdown-gpio=4 -r 32 --led-cols 64 -c 2 -P 1") elif "Rotating Square" in data: - screensaver_p = pexpect.spawn("sudo -E python3 ./rpi-rgb-led-matrix/bindings/python/samples/rotating-block-generator.py --led-gpio-mapping=adafruit-hat --led-slowdown-gpio=4 -r 32 --led-cols 64 -c 2 -P 1") + screensaver_p = pexpect.spawn("sudo ./demo --led-gpio-mapping=adafruit-hat --led-rows=32 --led-cols=128 -D 0") elif "Pulsating brightness" in data: - screensaver_p = pexpect.spawn("sudo -E python3 ./rpi-rgb-led-matrix/bindings/python/samples/pulsing-brightness.py --led-gpio-mapping=adafruit-hat --led-slowdown-gpio=4 -r 32 --led-cols 64 -c 2 -P 1") + screensaver_p = pexpect.spawn("sudo -E python3 pulsing-brightness.py --led-gpio-mapping=adafruit-hat --led-slowdown-gpio=4 -r 32 --led-cols 64 -c 2 -P 1") - elif "Game of Life" in data: - screensaver_p = pexpect.spawn("sudo -E python3 game_of_life.py") + elif "Volume Bars" in data: + screensaver_p = pexpect.spawn("sudo ./demo --led-gpio-mapping=adafruit-hat --led-rows=32 --led-cols=128 -D 9") + + elif "Evolution of Color" in data: + screensaver_p = pexpect.spawn("sudo ./demo --led-gpio-mapping=adafruit-hat --led-rows=32 --led-cols=128 -D 10 -m 100") + + elif "Conway's Game of Life" in data: + screensaver_p = pexpect.spawn("sudo ./demo --led-gpio-mapping=adafruit-hat --led-rows=32 --led-cols=128 -D 7 -m 100") + + elif "Abelian Sandpile Model" in data: + screensaver_p = pexpect.spawn("sudo ./demo --led-gpio-mapping=adafruit-hat --led-rows=32 --led-cols=128 -D 6") + + elif "Grayscale Block" in data: + screensaver_p = pexpect.spawn("sudo ./demo --led-gpio-mapping=adafruit-hat --led-rows=32 --led-cols=128 -D 5") elif "Sleep" in data: screensaver_p = DummyProcess()