morse transceiver system // random output

Hello there,

So I've been developing a morse transceiver radio system using nrf905 chips on two different Arduino, working on the same script.
I'm trying to get button inputs to send the morse over the radio, and also wait for the other device to receive their morse.

I've attached the code.

But for some reason, when i press any sort of combination of buttons and hit the send key, i get the following feedback:

23:15:13.599 -> 0
23:15:13.599 -> 0
23:15:13.599 -> 3
23:15:13.599 -> 5
23:15:13.599 -> 17
23:15:13.599 -> 1
23:15:13.599 -> 255
23:15:13.599 -> 255
23:15:13.599 -> 255
23:15:13.632 -> 255
23:15:13.632 -> 12
23:15:13.632 -> 80
23:15:13.632 -> 4
23:15:13.632 -> 4
23:15:13.632 -> 0
23:15:13.632 -> 0
23:15:13.632 -> 12
23:15:13.666 -> 194
23:15:13.666 -> 4
23:15:13.666 -> 36
23:15:13.666 -> 3
23:15:13.666 -> 185
23:15:13.666 -> 0
23:15:13.666 -> 0
23:15:13.666 -> 18
23:15:13.666 -> 204
23:15:13.666 -> 0

Can someone please help me with this. I can't seem to get the transceiver working. And when one receives, whatever the random feedback is, it pauses for like 20 or 30 seconds.

Much appreciated!
Fadi

transceiver_module.ino (8.58 KB)

Don't use the String class on AVR Arduinos! (you didn't specify your Arduino model, so it must be an UNO)

Format your code! (the IDE offers the Tools->AutoFormat function to help you with that)

You have many includes in the sketch you don't use. Although the object code not referenced will not be linked in, global code (p.e. ISRs, etc.) may be active in your sketch and influence other parts.

Post a wiring diagram of your setup!

But for some reason, when i press any sort of combination of buttons and hit the send key, i get the following feedback:

That output is not from the posted sketch!