Sir, I am getting a reading in reverse like this
-1 - no value
51 - 3
53 - 5
53 - 5
49 - 1
10
13
and the reading i receive in the ultrasonic is 1553. which is correct but there is a delay. when the 1553 is send from the ultrasonic, the receiver side receive one number at a time starting from the right most side, which is the number 3.
i was trying to use this value to satisfy this
if (XBee.read() >= 1000 )
{
digitalWrite(relay, LOW);
}
else
{
digitalWrite(relay, HIGH);
}
but its now working. there is no latching in the relay.
thanks!