G
G
gmg2017-03-01 20:36:53
Arduino
gmg, 2017-03-01 20:36:53

Arduino RS485 SoftwareSerial available() not null?

Good afternoon.
I am writing a data transfer between arduins. Faced a problem.
There are 3 arduinos.
From 1 arduino I send information to 2 by means of the SoftwareSerial class, via write.
And on the 3rd arduine, I read only the first byte. And I stop reading. Accordingly, when calling available (), it gives out not 0, apparently there are unread data there.
How to delete or reset this data. The way to count them is not suitable.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily F, 2017-03-10
@Vasilii_B2

Try to initialize the port again, the situation is generally interesting when you just read them into the buffer and do not use it - is it impossible?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question