Added thread safety to USB TX, servo control thread, primitive ADC thread, python test codes
This commit is contained in:
@@ -12,7 +12,10 @@ COMMAND_PREFIX = 0x69
|
||||
|
||||
COMMAND_ACK = 0
|
||||
COMMAND_NACK = 1
|
||||
LED = 2
|
||||
LED_TOGGLE = 2
|
||||
LED_SET = 3
|
||||
SERVO_SET = 4
|
||||
SERVO_SET_ALL = 5
|
||||
|
||||
DEVICE_ID = 0
|
||||
|
||||
@@ -112,7 +115,7 @@ def main():
|
||||
|
||||
for i in range(10):
|
||||
print(f"--> Sending LED command {i + 1}")
|
||||
ser.write(make_packet(LED))
|
||||
ser.write(make_packet(LED_TOGGLE))
|
||||
time.sleep(0.5)
|
||||
|
||||
print("Done.")
|
||||
|
||||
Reference in New Issue
Block a user