def danboard(): index = 1 pygame.mixer.init() while True: if pygame.mixer.music.get_busy() == True: time.sleep(rest_time) continue common.play_mp3('./assets/r2d2_' + str(index) + '.mp3') light.start_speak() index += 1 if index == 11: index = 1 time.sleep(rest_time)
def alarm_mp3_with_light(mp3): common.play_mp3(mp3) light.start_speak()
def r2d2(): common.play_mp3('./assets/portal.wav') light.start_speak() return "R2D2"
def alarm_page(): common.play_mp3('./assets/warning_1.mp3') light.start_alarm() logging.warning('Alarm!') return "Alarm sent!"