Mirf libaray(NRF )

hi there
i've tried to send senesros valuse using mirf library...
but at the other end i'm having some strange character
but when i'm send string like "string" it's working fine
any idea how to do it?

any idea how to do it?

It's simple. Write the correct code.

If you are having trouble doing that, you need to post the sender code, the receiver code, the sender debug output and the receiver debug output.

huh :slight_smile:
this part is for sending section :

void loop(){

int temp =1024;
Mirf.send((byte *) &temp);
delay(500);
  
}

and this part for receiving ....

int data; // or int data[32];
     if(!Mirf.isSending() && Mirf.dataReady()){
          Serial.println("Got packet");
          Mirf.getData((byte *) &data);
          Serial.println(data);

the problem is that...!
now i can't send any string it's limted to integer

any way for sending both string and the values!
tnx in advance :slight_smile:

now i can't send any string it's limted to integer

Nonsense. It is limited to sending bytes. Characters and bytes are the SAME size, so you CAN send strings.

A link to the library would be helpful. Posting ALL of your code would be, too. I can guess what mirf is an instance of, but I shouldn't have to.

Typically, a send() method should be overloaded to allow for sending one byte and to allow for sending an array of bytes (or chars).

If whatever mirf is an instance of does allow for sending an array of bytes, you can send an array of chars, too. It will probably be necessary to lie to the compiler, by using a cast.