Hello,
before you call nrf24.recv((uint8_t*)data, &len)
you must ensure that len is set to the amount of space available in the data buffer.
After the call, len will be set to the actual amount of data copied.
so, you must have something like this (untested)
char data[11];
uint8_t len = 10;
if (!nrf24.recv((uint8_t*)data, &len))
Serial.println("read failed");
// terminate the string
data[len] = 0;
Serial.println(data);
Cheers.
--
in sender: nrf24.setPayloadSize(sizeof(11))
sizeof(11) is the storagesize of the int 11 (i.e. probably 2)-- just set it to the size e.g. 11
--
You received this message because you are subscribed to the Google Groups "NRF24-Arduino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nrf24-arduin...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.