Hi guys,
I have been working on a Labview project to interface with arduino, using webbotlib.
I have setup a basic control loop to update the IO each 10ms, i am trying to attach a callback to UART0 so that i can capture 8 characters and use them as the instruction.
void myReceive(unsigned char data, void* device){
ch = uartGetByte(UART0);
if(ch == -1){
uartSendByte(UART0,122);
}
else{
uartSendByte(UART0,114);
}
bufferPut(&recieveBuffer,ch);
}
The above code tries to get a byte from the UART buffer and then tests it to see if it was correct, so far all of the data has been incorrect ie ch == -1.
how do i capture the incoming byte?
Thanks
T