hi,
i have the following payload
struct payload_t
{
int from_node;
char message[20];
};
i'm trying to do a function so i can just change the message that i want to send, but i'm having some problems with char* vs char
void loop(void)
{
network.update();
if (!sent) {
char message_to_send[20];
boolean status = sendMessage(light_node, this_node, message_to_send);
if (status) {
Serial.print(" [ok]");
sent = true;
} else
Serial.print(" [failed}");
}
}
bool sendMessage(uint16_t to_node, uint16_t from_node, char *message){
Serial.print("Sending to #");
Serial.print(to_node);
payload_t payload = { from_node, message};
RF24NetworkHeader header(/*to node*/ to_node);
bool ok = network.write(header,&payload,sizeof(payload));
return ok;
}
the problem is baseNode:89: error: invalid conversion from 'char*' to 'char'..
how can i do this ?
I just want to send a different message that i create and then give to sendMessage 3rd argument