I realise that this is probably a very basic question, however I've spent the last couple of days trying to figure it out by myself and have figured that my total lack of basic low-lvl programming is telling me not to skip over the fundamentals.
Problem is that I need to parse an integer value from python on my computer to an Arduino Diecimila through the serial connection and I'm amazingly confused about when I'm parsing strings, bits, bytes, integers and whatever other types there are.
What I need is a value between 700 and 2400 (pwm ms signal) and I'd like to parse it as 2 bytes instead of a 4 character string containing numbers, but I can't seem to figure out how to convert an integer in python to 2 bytes that I can send to the arduino and then convert them back to a value again?
I've probably missed something obvious in which case I'm sorry for wasting your time but I haven't been able to find any documentation that I could make sense of.
Thanks in advance. cheers