I have set-up a python TCP server and client. I send the data using the following commands:
[code]
def send2screen(motor_a,motor_b):
byte4 = chr(int(motor_a))
byte5 = chr(int(motor_b))
sock2.sendall(byte4+byte5)
< Other stuff goes here >
send2screen(motor_a,motor_b)
[/code]
When the data gets to the Server, I want to be able to separate the two variables motor_a and motor_b. The two variables hold a value that is constantly changing between 0 - 255 for each variable. eg. Motor_a = 64, motor_b = 117
Is there anyway that I can separate this information?
This is where the data will need to end up:
[code]
lcd.clear()
ipaddr = run_cmd(cmd)
lcd.message('A = ' +int(motor_a) ' | B = ' +int(motor_b) '/n')
lcd.message('IP %s' % ( ipaddr ) )
[/code]
Any help will be necessary.




