Example #1
0
import Com

print "Write the bianry you want to send!"
while True:
    propperCommand = True
    binary = raw_input(">>> ")
    for x in binary:
        if x == "1" or x == "0":
            pass

        else:
            print "Please Only Type Bianary!"
            propperCommand = False
            break
    if propperCommand and binary != "":
        Com.Init()
        Com.Binary(binary)
        print "Sent Data"
Example #2
0
    elif DegB == "00" and L == False:
        Info = "000"
    elif DegB == "01" and L == True:
        Info = "011"
    elif DegB == "01" and L == False:
        Info = "010"
    elif DegB == "10" and L == True:
        Info = "101"
    elif DegB == "10" and L == False:
        Info = "100"
    elif DegB == "11" and L == True:
        Info = "111"
    elif DegB == "11" and L == False:
        Info = "110"

    Com.Binary(Info)
    flashLEDoff()
    time.sleep(4)
    flashLEDon()
    time.sleep(4)
    flashLEDoff()
"""
    for x in Code:
        print x
        flashLEDon ()
        if x == 3:
            time.sleep(1)
            print "on for 1 sec"
        elif x == 8:
            time.sleep(2)
            print "on for 2 sec"