def on_enter_audiovisualizing(self, filename): logging.debug("We've just entered state audiovisualizing!") try: from webcli import WebCli wc1 = WebCli('http://pi.oh.wsh.no:8080') #wc1.get_request('/serialir/byte/1') #turn on logging.info('requesting the right audio input (via pi.oh.wsh.no)') # TODO: this is hardcoded.. wc1.get_request('/HASerialIR/write_byte/2') # switch audio input except: pass lma = LEDMatrixAudio(name='Audio', rgbmatrix=self.rgbmatrix, sharedqueue=self.sharedqueue, callback_function=self.to_idle, filepath=filename) #which one is it? lma.start() self.current_audio_thread = lma self.threadlist.append(lma)
#!/usr/bin/python import time #self.sharedqueue.append(SerializableQueueItem('HASerialIR', 'write_byte', '1')) #self.sharedqueue.append(SerializableQueueItem('HASerialIR', 'write_byte', '2')) from webcli import WebCli wc1 = WebCli('http://pi.oh.wsh.no:8080') #wc1.get_request('/HASerialIR/write_byte/1') #turn on print 'requesting the right audio input' wc1.get_request('/HASerialIR/write_byte/2') #switch audio input print 'sleep 5' time.sleep(5) #let it start up.. wc2 = WebCli('http://rpi2.oh.wsh.no:8080') print 'requesting awolnation sail music' wc2.get_request('/audioPlay/awolnation_sail.wav')