this is the website forum Race Coordinator (RC) - SlotForum
Are you mark h in the below linked thread?
Based on the thread that I found (lost protocol communication), you might still have some interference issues; this is far outside my area of expertise.
Some tests that you can do
Take your USB booster out, use only a short USB cable and see if the problem is solved.
If you switch wifi on while race coordinator is running, change the sequence. First switch the wifi on, next start race coordinator. Problem solved?
Does the system automatically recover after the wifi is switched on? Does it automatically recover if you switch the wifi off again? Does it recover after disconnecting / connecting the Uno while wifi is still on? Or not at all.
Regarding the code.
Is there a description of the protocol? Would make life easier.
The protocol seems a little wonkey.
Messages don’t contain a checksum or crc; so there is no way to check if a message is corrupted or not.
If an inChar is invalid (due to corruption), it will not be added to the buffer. As a result, your message might be one or more characters shorter and when processing a message you might access incorrect info.
If the message is corrupt (specifically the byte that indicates the number of pins to read), the dynamic memory allocation can fail if one tries to allocate too much memory. The pointers to the dynamically allocated memory should be checked for NULL after memory allocation.
There is a resetRequest command; do you know if that is issued by race coordinator in case of a “lost protocol” error? If it is and the Arduino does not react on it, the Arduino is definitely in a state where it should not be.
I might see things wrong but these are some notes/questions.
I’ve attached the unzipped code.
lapCounter.ino (20.8 KB)