Hello,
I am using two arduinos (one for transmitting and one to receiving) both connected to xbee shields for wireless communication.. The transmitter is connected to a pot and receiver is connected to a servo which I want to control with the pot...
The transmitter has to send a byte value (ranging from 0 to 1023) and the receiver has to receive that byte value and then convert that to INTEGER mapping (0, 1023) to (1100, 4800)... I am stuck with converting to integer to attain precision using the below codes (I have pasted just a few lines and hope you guys understand what I am talking about) and I have no other option...
#define servo1control OCR1A
TCCR1A = 0b10100010;
byte servoAng = Serial.read();
servo1control = servoAng;
So I very badly need to know the concept (or code) to send a byte value ranging from 0 to 1023 and receive that and convert to integer...
I am not even close to getting that done and I read that we can do this by splitting the values to 4 digits and sending them.. Then receive those 4 digits and merge them.. Or something like that...
But, couldnt really find on how to do that..
Any help would be greatly appreciated !!!!
Thanks