|
|
|
@ -7,7 +7,20 @@ import json, random, os, subprocess
|
|
|
|
|
from pprint import pprint
|
|
|
|
|
from time import sleep
|
|
|
|
|
from LEDfunctions import *
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
import subprocess
|
|
|
|
|
# is the announcements.py running?
|
|
|
|
|
try: # try: if no error - the process is running.
|
|
|
|
|
# therefore exit()
|
|
|
|
|
ann_pid = subprocess.check_output(["pgrep", "-f", "announcements.py"])
|
|
|
|
|
print("announcements.py ARE running. Will stop here", ann_pid)
|
|
|
|
|
|
|
|
|
|
except:
|
|
|
|
|
print("announcements.py are not running. Will run guru")
|
|
|
|
|
|
|
|
|
|
if 'ann_pid' in vars() or 'ann_pid' in globals():
|
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
|
|
# when characters speak the LEDs light up and perform effects
|
|
|
|
|
def vu_2_leds(color):
|
|
|
|
|