Greetings everyone, I want a program for which I want to receive serially for a particular amount of time and for the rest of the time it should not receive (if it is received and stored in buffer it should be discarded before entering the reception time).
in second code I feel I'm missing continuous reception.
can anyone write a code for continuous reception for a time of "internal" after which count has to be zero(count = 0)
can anyone write a code for continuous reception for a time of "internal" after which count has to be zero(count = 0)
It's not our practice to write code for poster because this gets abused too often by students who are too lazy to do their own homework and come here asking us to do it for them so they can go out and party. We know you are not one of those, right ? XD
We'll be happy to give you suggestions and point you to tutorials but asking us to write your code is crossing the line. We are here to help people learn , not to do their homework. I am sure you want to learn.
Please see this link, it says it waits for transmission to complete if we are sending any, and clears the buffered data came from other source.
If I'm wrong please enlighten me.
Yes, pardon me about it. =(
This is a part of a huge program which I'm working on based on Swarm robotics.
In my program the count will become zero at some point which is independent of "interval" so till then it must receive.
So i cant make count = 0.
Till count becomes equal to zero it has to receive.
Well not specifically, but as pointed out the function of Serial.flush() is different. The question is WHY are you using 0023 ?
You answered with a question "WHY ?" so you didn't answer my question. Is there a reason why you are avoiding my question ?