I am trying to convert a char array to a byte array. I need to use this byte array as pipe addresses for nRF24L01 module.
I referred to Arduino's documentation on byte() function to convert any data type to byte. Although it looks promising, it is not supported with an example.
Has anyone used this function before? I appreciate your help.
char whatever []= "NEW01"; // new pipe address
byte mybyte [5]; // we don't need the place for string terminator in the byte array
memcpy(mybyte,whatever,5);
Please do not post screenshots of error messages. There is a button (lower right of the IDE window) called "copy error message". Copy the error and paste into a post in code tags.