Beispiel #1
0
def setup_audio():
    with open('robotnik/robotnik.amr', 'rb') as wavefile:
        print("Writing audio")
        print(sim800.fsrm('C:\\ROBOTNIK.AMR'))
        print(
            sim800.fswrite('C:\\ROBOTNIK.AMR', wavefile.read(), truncate=True))
        print("Saved audio")
Beispiel #2
0
def load():
    global vip
    vip = False
    show_screen(0x000000, 0xFFFFFF, "LOADING")
    print("Copy AMR")
    sim800.fscreate("REC\\1.AMR")
    f = open('holland/wilhelmus.amr', 'r')
    data = f.read(256)
    c = len(data)
    sim800.fswrite("REC\\1.AMR", data, True)
    pr = c
    while (c > 0):
        data = f.read(256)
        c = len(data)
        sim800.fswrite("REC\\1.AMR", data, False)
        pr = pr + c
        show_screen(0x000000, 0xFFFFFF, "LOADING", str(pr))
        print(str(pr))
    f.close()
    show_screen(0x000000, 0xFFFFFF, "DONE")