VirtualWire + Keypad : error: invalid conversion from 'char' to 'const char*'

Hello, I’m trying to do this …

From the keypad I’d like to read the value for example one, assign it like a message and then send this value with virtual wire … should be quite easy … but I receive this error … error: invalid conversion from ‘char’ to ‘const char*’

do you know the ways guys how to fix that ? I think is something related to the conversion but I don’t know how to fix it … this the code

#include <VirtualWire.h> // include la libreria per la comunicazione
#include <Keypad.h>

// definizione del Keypad
const byte ROWS = 4; //four rows
const byte COLS = 3; //three columns
char keys[ROWS][COLS] = {

byte rowPins[ROWS] = {8, 7, 6, 5}; //Righe collegate ai PIN 8,7,6,5
byte colPins[COLS] = {4, 3, 2}; //Colonne collegate ai PIN 4,3,2
// byte buttonState = LOW;

// Inizializzazione del Keypad
Keypad customKeypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

void setup() 

// vw_set_ptt_inverted(true); // Required for DR3100
vw_setup(1200); // setta la velocità di trasmissione a 1200 Bits per sec


void loop()  // loop del micro controllore
     // Leggo il Keypad
     char customKey = customKeypad.getKey();
     if (customKey != NO_KEY){
// the issues is in the next row const char *msg = customKey;       
            const char *msg = customKey;
            digitalWrite(13, true); // Flash a light to show transmitting
            vw_send((uint8_t *)msg, strlen(msg));  // invia la lettera a
            digitalWrite(13, false); // spegni il led quando ha finito di trasmettere
              // aspetta 400 ms prima di andare avanti

Thanks in advance for the help :stuck_out_tongue:

            char msg[1];
            msg[0] = customKey;
            digitalWrite(13, true); // Flash a light to show transmitting
            vw_send((uint8_t *)msg, strlen(msg));  // invia la lettera a


Thank you very much ! now the compilation it's ok :-) ... I will test when will arrive the keypad and then len I let you know ...

That's means that is necessary use an array ?

have nice day, Andrea

Yes I've try to simulate the keypad and it's working ;-)

thanks again ...