def getscene(serial): ans = [] ans.append(examine(speak.gettext('1st Color?', 4), serial)) print(ans) for i in ans: engine.say(i) engine.runAndWait() ans.append(examine(speak.gettext('2nd Color?', 4), serial)) print(ans) for i in ans: engine.say(i) engine.runAndWait() ans.append(examine(speak.gettext('3rd Color?', 4), serial)) print(ans) for i in ans: engine.say(i) engine.runAndWait() ans.append(examine(speak.gettext('4th Color?', 4), serial)) print(ans) for i in ans: engine.say(i) engine.runAndWait()
def getscene(): #Speech to Text here symbol_master = [['lollipop', 'a', 'Lambda', 'n', 'dinosaur', 'h', 'moon'], ['']] color = speak.gettext('Button Color?') text = speak.gettext('Button Text?') color = color_map[color] return symbols
def getscene(): #Speech to Text here color_map = { 'blue': 'B', 'red': 'R', 'yellow': 'Y', 'black': 'BL', 'white': 'W', 'nothing': 'E' } color = speak.gettext('Button Color?', 1) text = speak.gettext('Button Text?', 1) color = color_map[color] return color, text
def getscene(): wires = [] color_map = { 'blue': 'B', 'red': 'R', 'yellow': 'Y', 'black': 'BL', 'white': 'W', 'nothing': 'E' } print() w1 = speak.gettext('Wire 1?', 1) print() w2 = speak.gettext('Wire 2?', 1) print() w3 = speak.gettext('Wire 3?', 1) print() w4 = speak.gettext('Wire 4?', 1) print() w5 = speak.gettext('Wire 5?', 1) print() w6 = speak.gettext('Wire 6?', 1) wires.append(color_map[w1]) wires.append(color_map[w2]) wires.append(color_map[w3]) wires.append(color_map[w4]) wires.append(color_map[w5]) wires.append(color_map[w6]) return wires
def release(color, text): print() strip = speak.gettext('Press and hold, what is the Strip Color?') if (strip == 'blue'): timer = '4' elif (strip == 'white'): timer = '1' elif (strip == 'yellow'): timer = '5' else: timer = '1' engine.say(timer) engine.runAndWait()