Home Forums EasyTransfer Library Support Forum Suggestion: .end command to complement .begin Reply To: Suggestion: .end command to complement .begin

#3160
Anonymous
Inactive

Thanks.

I noticed that it doesn’t lock up if it doesn’t receive anything (I had a bad connection on the RX line, and I’m still trying to trace that down). It doesn’t, however, clear the received array if nothing comes in (so it keeps the last received values).

I got around the problem of stale data by adding an additional position to my integer array, and setting it to 0 on the receiving end before telling it to receive data, and setting it to 1 on the transmit end. If it is 1 after running the receiveData() command, then the data is new. Otherwise, it is old data.

If I combine that with the loop you suggested, I should be able to test for new data a few times, and then give up.

But then I ran into a number of other problems last night (*something* is causing the Arduino to hang and/or crash/reboot, and I had to roll back to my stable code and re-try everything.

I have a few more questions:

1. If the sending end transmits before the receiveData() function is run on the recieving end, does that data just stay in the RX buffer until it is read?

2. If “strange” data (non-EasyTransfer) data shows up on the RX line when the receiveData() function runs, what happens? For example, if I send some “regular” serial data out over the serial bus, and the EasyTransfer “slaves” receive it, will they be able to receive the EasyTransfer data that is sent afterward?

Thanks.

–Noam