print(speed2[1])
    else:
        print("failed")


rc.open()
address = 0x80

version = rc.ReadVersion(address)

if not version[0]:
    print("GET VERSION Failed")
else:
    print(repr(version[1]))

nb = 0
while nb < 100:
    rc.SpeedM1(address, 2000)
    rc.SpeedM2(address, -2000)
    for i in range(0, 200):
        display_speed()
        time.sleep(0.01)

    rc.SpeedM1(address, -2000)
    rc.SpeedM2(address, 2000)
    for i in range(0, 200):
        display_speed()
        time.sleep(0.01)

    nb += 1
Exemplo n.º 2
0
		print("failed ")
	print("Speed1:")
	if(speed1[0]):
		print(speed1[1])
	else:
		print("failed")
	print("Speed2:")
	if(speed2[0]):
		print(speed2[1])
	else:
		print("failed ")

version = rc.ReadVersion(address)
if version[0]==False:
	print("GETVERSION Failed")
else:
	print(repr(version[1]))

while(1):
	rc.SpeedM1(address,12000)
	rc.SpeedM2(address,-12000)
	for i in range(0,200):
		displayspeed()
		time.sleep(0.01)

	rc.SpeedM1(address,-12000)
	rc.SpeedM2(address,12000)
	for i in range(0,200):
		displayspeed()
		time.sleep(0.01)