Can someone provide help with this problem?
I'm using a LV-MaxSonar-EZ3 connected to an Axon. I have no problems using the analog output of the sonar, but wish to use the serial to obtain greater accuracy. According to the datasheet from Maxbotix, the sonar sends a 'R' followed by the measurement in inches and then by the carriage return (ASCII 13). When I connect the serial output of the sonar to the Axon, I do not get an 'R' or a CR. Using this code:
int snr = 0;
while(1)
{
snr=uart0GetByte();
if (snr != -1)
{
rprintf("%d\r",snr);
};
I get:
43
103
102
100
121
(which is repeated)
I would expect to get an 82 (ASCII value of R) as the first value and a 13 (ASCII value of CR) as the last value.