Advertisement
Guest User

pi led ticker rotation scripts

a guest
Oct 17th, 2021
414
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 KB | None | 0 0
  1. # first script - kicks off at boot
  2. cat start-scoreboard.sh
  3. #!/bin/bash
  4. cd /home/pi/
  5. ./piTickerBoards.sh &
  6.  
  7.  
  8.  
  9. # second - main rotation script
  10. cat piTickerBoards.sh
  11. #!/bin/bash
  12. while true; do
  13.  
  14. cd /home/pi/nfl-led-scoreboard
  15. python main.py --led-gpio-mapping=adafruit-hat-pwm --led-brightness=50 --led-slowdown-gpio=2 & sleep 1200;
  16. ps aux | grep python | grep -v "grep python" | awk '{print $2}' | xargs kill -9
  17. echo "nfl-led-scoreboard - main.py -- any -- python process KILLED! onto the next ticker board!"
  18.  
  19. cd /home/pi/RPi-RGB-Matrix-Scrolling-Sign-master
  20. echo "changed to second dir and about to run text scrolling"
  21. python RGB-32x64.py --led-gpio-mapping=adafruit-hat-pwm --led-brightness=50 --led-slowdown-gpio=2 & sleep 1200;
  22. #echo "this is from second scrolling text"
  23. ps aux | grep python | grep -v "grep python" | awk '{print $2}' | xargs kill -9
  24. echo "RGB-32x64.py (and any)python process KILLED! onto the next ticker board!"
  25.  
  26. #cd /home/pi/RPi-RGB-Matrix-Scrolling-Sign-master
  27. #echo "changed to news only scrolling and about to run text scrolling"
  28. #python news-RGB-32x64.py --led-gpio-mapping=adafruit-hat-pwm --led-brightness=50 --led-slowdown-gpio=2 & sleep 3600
  29. #echo "this is from second scrolling text"
  30. #ps aux | grep python | grep -v "grep python" | awk '{print $2}' | xargs kill -9
  31. #echo "news-RGB-32x64.py (and any)python process KILLED! onto the next ticker board!"
  32.  
  33. cd /home/pi/RPi-RGB-Matrix-Scrolling-Sign-master
  34. echo "changed to second dir and about to run text scrolling"
  35. python espn-RGB-32x64.py --led-gpio-mapping=adafruit-hat-pwm --led-brightness=50 --led-slowdown-gpio=2 & sleep 1200;
  36. #echo "this is from second scrolling text"
  37. ps aux | grep python | grep -v "grep python" | awk '{print $2}' | xargs kill -9
  38. echo "espn-RGB-32x64.py (and any)python process KILLED! onto the next ticker board!"
  39.  
  40. cd /home/pi/nhl-led-scoreboard
  41. python3 /home/pi/nhl-led-scoreboard/src/main.py --led-gpio-mapping=adafruit-hat-pwm --led-brightness=40 --led-slowdown-gpio=2 & sleep 1200;
  42. #echo "changed to first board, ran and delayed 10 seconds..." & sleep 10;
  43. ps aux | grep python | grep -v "grep python" | awk '{print $2}' | xargs kill -9
  44. echo "nhl-led-scoreboard - main.py -- any -- python process KILLED! onto the next ticker board!"
  45.  
  46. cd /home/pi/mlb-led-scoreboard
  47. python /home/pi/mlb-led-scoreboard/main.py --led-gpio-mapping=adafruit-hat-pwm --led-brightness=50 --led-cols=64 --led-rows=32 & sleep 1200;
  48. ps aux | grep python | grep -v "grep python" | awk '{print $2}' | xargs kill -9
  49. echo "mlb-led-scoreboard - main.py (and any)python process KILLED! onto the next ticker board!"
  50.  
  51.  
  52. cd /home/pi/crypto-ticker
  53. python3 /home/pi/crypto-ticker/ticker.py --led-gpio-mapping=adafruit-hat-pwm --led-brightness=35 --led-cols=64 --led-rows=32 & sleep 600;
  54. ps aux | grep python | grep -v "grep python" | awk '{print $2}' | xargs kill -9
  55. echo "crypto-ticker - ticker.py (and any) python processes KILLED! onto the next ticker board in cycle!"
  56.  
  57. cd /home/pi/NBA-scoreboard
  58. python3 /home/pi/NBA-scoreboard/NBA_Data.py && python3 /home/pi/NBA-scoreboard/Spreads_New_Day.py && python3 /home/pi/NBA-scoreboard/Spreads_Update.py && python3 /home/pi/NBA-scoreboard/NBA_Re
  59. nder.py --led-gpio-mapping=adafruit-hat-pwm --led-brightness=35 --led-cols=64 --led-rows=32 & sleep 1000;
  60. ps aux | grep python | grep -v "grep python" | awk '{print $2}' | xargs kill -9
  61.  
  62.  
  63. echo "restarting the All ticker boards cycle!"
  64.  
  65. pkill -f python
  66. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement