Get the ds18b20 unique id and set it to nrf24001 pipes

Hi, i need to set the unique id of the ds18b20 and sat it number to one pipe of the nrf24l01

Example:

I have the unique id of the ds18b20: 28fff00364140368

And i need to set this string in the nrf24l01: const uint8_t direccion_antena[]= //ds18b20 unique id

Please help me!!

What exactly is your problem? Is it trying to take the 64 bit sensor ID and break it up int an array of bytes? That seems to be what you are showing in your code snippet.

What library are you using? I'm not familiar with that radio module, but the first library I found for it already takes a 64 bit number, not a byte array to specify a pipe ID: maybe using a different library will make it easier?

What have you done or tried so far?

If you just ant to break up the 64 bit number to a byte array, the simplest is a loop that masks off a byte at a time using a bitwise AND operation, and then shifts the value by 8 bits during each loop.

This doesn't seem to be an issue specific to the Yun, it seems like a programming question. You might get more responses in the Programming Questions forum.

The NRF24 "pipe" uses a 5-byte (max) address. Your number seems to be 8 bytes - 28 ff f0 03 64 14 03 68

...R