Arduino mega connected to nRF24L01 module transmitter and receiver.I want to index the transmission in nRF24L01 , for example while transmitting the character, i need to concatenate a variable in the end so that i get to know which transmission the receiver is receiving for example: if i am transmitting Hello world i need to concatenate a variable i in the end of the char hello world which will take values from 1 to 9 and send Hello world1, Hello world2,...Hello world 9 and in the receiver side see how many data i do receive... any ideas?The transmitted code.
Where is the int coming from? Digital inputs? If so:
Since you have defined text[] as const char[], that declaration will also need to be changed. It will no longer be a precompiled constant. The const will need to be deleted, a length defined for text[] (text[x ]). Then use sprintf or snprintf to get Hello World and the integer assigned to text[].
Characters are represented as numbers (ASCII character codes) internally. If you add 1 to 'A' you get 'B'. 'B' +1 = 'C'. Note the single quotes around the letters, Without the quotes they are not characters.