Esempio n. 1
0
def ClaimReward():
    print("ClaimReward")
    send('BUTTON A', 0.1)
    sleep(1)
    for i in range(10):
        send('BUTTON B', 0.1)
        sleep(0.5)
def RemoveRow():
    for i in range(6):
        print("")
        print("removing" + str(i))
        sleep(0.5)
        RemoveMon()
        sleep(0.5)
        if (i <= 5):
            send('HAT LEFT', 0.1)
def RemoveBox():
    # Get to bottom right
    ResetCursor()

    for i in range(5):
        print("")
        print("removing row" + str(i))
        RemoveRow()
        if (i <= 3):
            send('HAT TOP', 0.1)
            send('HAT RIGHT', 2)
    sleep(10)
Esempio n. 4
0
def DenCycle():
    print("DenCycle")
    OpenDen()
    sleep(1)
    OpenTime()
    sleep(1)
    FixDate()
    sleep(1)
    ExitHome()

    sleep(1)
    send('BUTTON B', 0.1)
    sleep(1)
    send('BUTTON A', 0.1)
Esempio n. 5
0
def OpenDen():
    print("OpenDen")
    send('BUTTON A', 0.1)
    sleep(1)
    send('BUTTON A', 0.1)
    sleep(1)
    send('BUTTON A', 0.1)
    sleep(4)
def ResetCursor():
    send('HAT BOTTOM', 2)
    send('HAT RIGHT', 2)
    send('HAT TOP', 0.1)
    send('HAT RIGHT', 2)
    sleep(1)
def RemoveMon():
    send('Button A', 0.1)

    sleep(1)

    send('HAT BOTTOM', 0.7)
    send('HAT TOP', 0.1)

    sleep(0.1)

    send('Button A', 0.1)

    sleep(1)

    send('HAT TOP', 0.1)

    sleep(1)

    send('Button A', 0.1)

    sleep(2)

    send('Button A', 0.1)
        RemoveMon()
        sleep(0.5)
        if (i <= 5):
            send('HAT LEFT', 0.1)


def RemoveBox():
    # Get to bottom right
    ResetCursor()

    for i in range(5):
        print("")
        print("removing row" + str(i))
        RemoveRow()
        if (i <= 3):
            send('HAT TOP', 0.1)
            send('HAT RIGHT', 2)
    sleep(10)


try:
    # while True:
    for i in range(5):
        RemoveBox()
        ResetCursor()
        send('Button R', 0.1)

except KeyboardInterrupt:
    send('RELEASE')
    ser.close()
Esempio n. 9
0
def ExitHome():
    print("ExitHome")
    for i in range(10):
        send('BUTTON B', 0.1)
        sleep(0.2)
    send('BUTTON HOME', 0.3)
Esempio n. 10
0
def OpenTime():
    print("OpenTime")
    send('BUTTON HOME', 0.3)
    sleep(1)
    send('HAT BOTTOM', 0.1)
    send('HAT RIGHT', 0.7)
    send('HAT LEFT', 0.1)
    send('BUTTON A', 0.1)
    sleep(1)
    send('HAT BOTTOM', 1.5)
    send('BUTTON A', 0.1)
    sleep(1)
    for i in range(4):
        send('HAT BOTTOM', 0.1)
        sleep(0.2)
    send('BUTTON A', 0.1)
    sleep(1)

    for i in range(2):
        send('HAT BOTTOM', 0.1)
        sleep(0.2)

    send('BUTTON A', 0.1)
Esempio n. 11
0
def FixDate():
    print("FixDate")
    global month
    global day
    send('HAT TOP', 0.1)
    sleep(0.1)
    day = day + 1
    if day > 20:
        day = 0
        for i in range(20):
            send('HAT BOTTOM', 0.1)
            sleep(0.1)

        sleep(0.1)
        send('HAT RIGHT', 0.1)
        send('HAT TOP', 0.1)
        sleep(0.1)

        month = month + 1
        if month > 10:
            month = 0
            for i in range(10):
                send('HAT BOTTOM', 0.1)
                sleep(0.1)

            sleep(0.1)
            send('HAT RIGHT', 0.1)
            send('HAT TOP', 0.1)
            sleep(0.1)

    for i in range(6):
        send('BUTTON A', 0.1)
        sleep(0.2)
def FlyToDaycare():
    ## Fly to daycare
    print("Flying to Daycare")
    sleep(0.1)
    send('Button X', 0.1)
    sleep(1)
    send('HAT RIGHT', 1)
    sleep(0.2)
    send('HAT TOP', 1)
    send('Button A', 0.1)
    sleep(3)
    send('Button A', 0.1)
    sleep(1)
    send('Button A', 0.1)
    sleep(3.5)
import SerialSend
from SerialSend import send
from time import sleep

send('Button A', 0.1)
sleep(1)
# send('Button A', 0.1)
# sleep(1)
# send('Button A', 0.1)
# sleep(3)


def FlyToDaycare():
    ## Fly to daycare
    print("Flying to Daycare")
    sleep(0.1)
    send('Button X', 0.1)
    sleep(1)
    send('HAT RIGHT', 1)
    sleep(0.2)
    send('HAT TOP', 1)
    send('Button A', 0.1)
    sleep(3)
    send('Button A', 0.1)
    sleep(1)
    send('Button A', 0.1)
    sleep(3.5)


try:
    while True:
Esempio n. 14
0
import SerialSend
from SerialSend import send
from time import sleep

while True:
    sleep(2)
    send('BUTTON HOME', 10)
Esempio n. 15
0
import SerialSend
from SerialSend import send
from time import sleep

send('Button B', 0.1)
sleep(1)
send('Button B', 0.1)
sleep(1)

try:
    sleep(5)
    while True:
        send('Button A', 0.1)
        sleep(1)

except KeyboardInterrupt:
    send('RELEASE')
    ser.close()