Sending array by using wifi
Posted: Wed May 11, 2022 10:05 pm
Hello,
In this code I return string from the function readTemp().Now I'm asking what is I should use rather than c_str if I need to return unsigned char?
Now I need to deal with
In this code I return string from the function readTemp().Now I'm asking what is I should use rather than c_str if I need to return unsigned char?
Code: Select all
string readTemp() {
return string(50);
}
void setup(){
request->send_P(200, "text/plain", readTemp().c_str());
}
Code: Select all
unsigned char readTemp() {
unsigned char a[5]={1,2,3,4,5};
return (a);
}
void setup(){
request->send_P(200, "text/plain", readTemp().c_str()); // here what should I use
// instead of c_str to sent unsigned char array ?
}