Hello!!
I am trying to meger to value of type uint8_t.
Initialy, the code is as the following:
uint8_t data[] = "Recieved";
rf95.send(data, sizeof(data));
The things, I also sent the recieved value of buf
Serial.println((char*)buf);
Then I tied like this (I chnaged Recieved to Rec)
//uint8_t data[] = "Recieved:";
uint8_t data[RH_RF95_MAX_MESSAGE_LEN];
sprintf(data,"Rec:%d",buf);
rf95.send(data, sizeof(data));
I also tried several soluiton
sprintf(data,"Rec:%i",buf);
sprintf(data,"Rec:%c",buf);
sprintf(data,"Rec:%d",(char*)buf);
I think that for the third, (crag*) is not really usefull as buf is initially declared as uint8_t
uint8_t buf[RH_RF95_MAX_MESSAGE_LEN];
I also tried
uint8_t data[RH_RF95_MAX_MESSAGE_LEN];
data[strlen(data)]= buf;
or
data[strlen(data)]= (char*)buf;
but none of them work
Would it be possible to have a tips or hints?
Many thanks
Cheers