Closed adrianTNT closed 4 years ago
Does my_data here always needs to be of char type ?
It's not char, it's a char array with a specific maximum size depending on the configuration of your radio (see documentation on payload size for that information), and yes, it needs to be of that type because a bunch of bytes are roughly speaking the only thing that are transmitted by the radio.
And if not, how would that line look if my_data is a string?
The same way. But before that line you should be filling my_data
with an appropriately sized part of your String
.
I have a question, I am not very experienced with Arduino. When sending and receiving data with the RF24 library:
Does
my_data
here always needs to be of char type ? And if not, how would that line look ifmy_data
is a string ?I am asking because I find it easier to append and do other operations on string rather than char.
Thank you.