Example #1
0
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()
Example #2
0
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
Example #5
0
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()