I'm working on a little module that uses NRF24L01+ to communicate and trigger actions. It's using TMRH20's NRF24Network library, and sends a message of a single char. This triggers an action on the receiving module, which after completing the action responds (again with a single char) to act as a "confirmation."
I was experimenting with it last night using an Arduino and serial monitor to send the char and view the response.
For those wondering, I'm using the same baud rate for the serial monitor as in my code. It seems to be working correctly, correctly triggers the action, and even correctly receives the appropriate response message ("k" for "okay," "a" for "that's already done," "e" for "error / bad input").
The only strange thing is that there is an odd question mark symbol and a Q attached at the end of each received confirmation message, so for example:
Trying to send code: b
Received code: k �Q
Trying to send code: t
Received code: k �Q
Trying to send code: w
Received code: e �Q
Does anybody know what this might be about? Again, it's not an actual ? but a little symbol of one, I'll try to attach a screenshot later today.
PaulS:
Why are you reading the message one character at a time?
Why are you sending data one character at a time?
It's not really sending "the message one character at a time" -- the single character is the message, as stated at the very beginning of the post. It just has to trigger an action, why not use a char?
PaulS:
The code you posted does not match the serial output you claim to get.
PaulS:
Why would you post code that does not generate the output that you showed? You are wasting our time.
I don't follow. You seem to be trying pretty hard to give curt, unhelpful responses, which seems to be wasting my time as well. Perhaps you could explain what you mean, or feel free not to respond further if you feel that your time is being wasted.
Running this code currently, I'm getting identical output except for the characters in question (�Q). The presence of those characters was the exact reason for the post.
Trying to send code: b
Received code: k
Trying to send code: t
Received code: k
Trying to send code: w
Received code: e
No worries. As luck would have it, after it being so consistent a few evenings ago, I'm unable to replicate the issue today, so I think I'll just cross my fingers and blame it on either a faulty connection or poor network conditions that evening. If the unusual characters return I'll try your suggestion and update the thread.
Just for clarification, and in case it comes back, you were suggesting that I try something like: