Apologies I know this has probably been asked time and time again but I've spent 2 days trawling through google and the various forums and non of the serial code samples work for me.
Here is a sample of the serial data I am receiving (I receive 15 samples a second):
The output never stops. Each reading is separated by a new line so I would have thought I could have either read the reading either through number of bytes or looking for the new line character.
The output never stops. Each reading is separated by a new line so I would have thought I could have either read the reading either through number of bytes or looking for the new line character.
Then, the new line IS part of the serial stream. It must ACTUALLY be read to remove it from the buffer.
You will need to read and store the data until the end of record marker arrives. Then you can analyze the packets to make sure that the packet is the right length and starts with the right character.
I suspect that you are loosing serial data because you are not reading it faster (or correctly) than it arrives.
I'm simplified everything, I just send one character at a time now.
It seems to be the way I have set up serial2 port, it would appear that it is the baud rate but I am 100% sure it should be 9600, so how on earth can it be messing up!?..
Serial port baud is also correct. I've swapped Serial1 to Serial.read and it works perfectly.
Yes I tried all the examples with the same result as per the text above.
I'm trying to read serial output from a ADC that is outputting over serial.
I've now removed it from the arduino and plugged the RX into the tx on my serial cable plugged into my PC via tera term. The results are detailed in reply 8.
So it seems to be something up with the configuration on my due.
Yes I tried all the examples with the same result as per the text above.
I'm trying to read serial output from a ADC that is outputting over serial.
I've now removed it from the arduino and plugged the RX into the tx on my serial cable plugged into my PC via tera term. The results are detailed in reply 8.
So it seems to be something up with the configuration on my due.