Hi,
I'm trying to send a message over a wireless module,
I need to send a string of text but i'm getting a error:
How do i fix this problem?
sketch_apr28a.ino: In function 'void loop()':
sketch_apr28a:14: error: cannot convert 'String' to 'const char*' in initialization
#include <VirtualWire.h>
void setup()
{
vw_set_ptt_inverted(true); // Required by the RF module
vw_setup(2000); // bps connection speed
vw_set_tx_pin(3); // Arduino pin to connect the receiver data pin
}
void loop()
{
String message = "Test";
const char *msg = message;
vw_send((uint8_t *)msg, strlen(msg));
vw_wait_tx(); // We wait to finish sending the message
delay(200); // We wait to send the message again
}