def __init__(self): try: self.device = serial.Serial(self.SERIAL_DEVICE) self.toy = irtoy.IrToy(self.device) except: speaker.say("Can't connect to IR Toy!") self.receiver = RXV()
def say(): message = request.form.get('message') speaker.say(message) return jsonify(success=True)