This is the library for the wireless communication.
The communication protocol consists of multiple steps.
-
Ping mode Robot 1 continuously broadcasts a certain character ('>'). Robot 2 will respond with '<' if it reads the ping command. This establishes a "sender-receiver"-relation between the two robots. All outgoing communication (so the messages) from the receiver and all incoming communication to the sender are blocked until further notice.
-
Sending and receiving Robot 1 will send the first message from the send-queue multiple times. This queue consists of
Message
structs, which are defined below. At sending, thesent
flag is set totrue
. When robot 2 calls the read function in the main loop, it will detect the message that has been sent. All message bodies are written in the following syntax:#-!
. When the message is found and seperated, the robot will send back an affirmation of the message by sending a message of th