Go Down

Topic: data lost in serial monitor (Read 282 times) previous topic - next topic

GeorgeCarlo

i send data from arduino to nodemcu at 9600 baud, the thing is everything works fine, except some losses in serial monitor,

Code: [Select]

85.00
32.00
85.00
2.00
85.00
32.00
85.00
32.00
85.00
32.00
85.00
32.00
85.00
32.00
85.00
2.00
85.00
32.00
85.00
32.00
85.00
32.00


is there a way, i use softwareserial, but nodemcu does not support altsoftserial, any solutions to change or to chnage baud rate ?

MorganS

Even though you should not be losing large numbers of characters over Serial, every Serial interface should be written with the assumption that some or all characters can disappear at any time. If the thing gets unplugged, does it wait forever?

Re-write your interface so that the receiver can detect and recover from missing data. Follow Robin's Serial Input Basics tutorial.
"The problem is in the code you didn't post."

PaulS

Quote
any solutions
Of course. Fix your code.

Since you didn't post it, you are completely on your own to do that.
The art of getting good answers lies in asking good questions.

sterretje

I don't see where you loose data.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

TomGeorge

Hi,
I think the OP is sending 85 and 32 repetively, so 2 is a loss of one digit.

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

sterretje

But OP did not say so ;) So we just have to guess 8)
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

TomGeorge

But OP did not say so ;) So we just have to guess 8)
Yup, isn't that what we are expected to do?   :) :)
Everything runs on smoke, let the smoke out, it stops running....

Go Up