Hello All,
I am using the Launchpad to read serial data from an instrument. Each reading from the instrument is prefixed with the '~' character. I am trying to read this serial input (via UART5). However, I have some trouble parsing this data. Here is the portion of code I am using:
int b=0;
int noofreadingstoaverage5;
while (b<noofreadingstoaverage){
//c=UARTCharGetNonBlocking(UART5_BASE);
c=UARTCharGet(UART5_BASE);
UARTprintf("%c",c); // echo character
if ((c=='~')||(c==126)) {
b++;
UARTprintf("\n%i",b);
}
}
The trouble is the input '~' is not being counted. So b remains 0. How do I fix this?
Thanks.
Mike

