Example #1
0
def drawBoard(board):
    # This function prints out the board that it was passed.

    # "board" is a list of 10 strings representing the board (ignore index 0)
    turn_all_off()
    for i, b in enumerate(board[1:10]):
        if b.lower() == 'x':
            blink_on(i)
        elif b.lower() == 'o':
            switch_on(i)
        else:
            switch_off(i)
            blink_off(i)
Example #2
0
def blink_on_serial():
    for led in LED_INDICES:
        blink_on(led)
        time.sleep(TOGGLE_INTERVAL)
        blink_off(led)
        pass