martinm1996:
I have built a radio transmission via NRF24L01. Now a message is always transmitted as a string.
Is it? Why?
Usually it is much easier to transmit the data as a sequence of bytes in its raw form.
Saves all the translating to and back from a string at both ends.
At the recipient, I would like to cache the message in a variable so that I can output it until the next transmission.
How do i do this?
Create a variable, store the received data in the variable, output the variable???
@MarkT: Unfortunately my code is too long to post here. The circuit diagram is also too complex.
@pcbbc: Okay. My broadcast chain is currently sending this out as a string. How do I send this as a byte sequence?
You have to imagine it like this. Every 10 seconds I send a data packet as a string. This data packet is only visible to the receiver for 1 second. The remaining 9 seconds the data packet can be shown in the 0.96 inch display, since it resets the display text every 500ms. I need my data packet until the next one arrives. Greetings Martin
This data packet is only visible to the receiver for 1 second. The remaining 9 seconds the data packet can be shown in the 0.96 inch display, since it resets the display text every 500ms. I need my data packet until the next one arrives.
That leaves so many questions unanswered, sorry. We need to see code.
If you receive the data (I have no idea what "visible to the receiver for 1 second" means) then store that data in a global variable. That global will then be available to the rest of the program until the next packet of data is received and updates the global variable.
Why reset the display text every 500ms if you are only receiving data every 10 seconds? The simple answer (without seeing the rest of your code of course) is only reset the display text when you receive new data. There's no point doing it otherwise.