0

Link of the member What is the character parameter in the above member of the class NRF24Network I cannot understand the use of it.

1

It's to identify the type of packet. Apparently that code supports types of 0-127, and I guess (impossible to tell without digging into the code) that what you use them for is entirely up to you. Basically it would typically define what is in the rest of the packet - again something which is up to you.

  • Yes but i have to put a char but it takes types 0-127. What does that mean – Christos Mitsis May 29 '15 at 18:46
  • Hint: 'a' is 97. '8' is 56. ASCII. – Majenko May 29 '15 at 18:47
  • Oh now I understand. And for example if I want to parse rgb code I will send 3 packets with -for example- type r,g,b ? – Christos Mitsis May 29 '15 at 18:50
  • Or one packet with 'c' for colour and three values in your packet... – Majenko May 29 '15 at 18:52
  • 1
    Use a struct and send them as one single compound variable. – Majenko May 29 '15 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.