error while compiling code for transmitting keypad data over 433 MHz RF link.

Hi!
This is my code.

#include<VirtualWire.h>
    
    const int numRows = 4;
    const int numCols = 3;
    const int debounceTime = 20;
    
    const char Keymap[numRows][numCols] = {
      {'1','2','3'},
      {'4','5','6'},
      {'7','8','9'},
      {'*','0','#'}
    };
    const int rowPins [numRows] = {7,2,3,6};
    const int colPins [numCols] = {5,8,4};
    void setup()
    {
      Serial.begin(9600);
      for (int row = 0; row < numRows; row++)
      {
        pinMode(rowPins[row],INPUT);
        digitalWrite(rowPins[row],HIGH);
    }
    for(int column = 0; column < numCols; column++)
    {
      pinMode(colPins[column],OUTPUT);
      digitalWrite(colPins[column],HIGH);
    }
    vw_setup(2000);
        }
        
        
    void loop()
    {
     char Key = getKey();
      send (Key);
    }
    char getKey()
    {
      char Key = 0;
      for(int column = 0; column < numCols; column++)
      {
        digitalWrite(colPins[column],LOW);
        for(int row = 0; row < numRows; row++)
        {
          if(digitalRead(rowPins[row])== LOW)
          {
            delay(debounceTime);
            while(digitalRead(rowPins[row])== LOW);
            Key = Keymap[row][column];
          }
        }
        digitalWrite(colPins[column],HIGH);
      }
      return Key;
    }
  void send (char *message)
{
vw_send((uint8_t *)message, strlen(message));
vw_wait_tx(); // Wait until the whole message is gone
}

This is the error my compiler is showing up.

remote_tx.ino: In function 'void loop()':
remote_tx:35: error: invalid conversion from 'char' to 'char*'
remote_tx:35: error: initializing argument 1 of 'void send(char*)'

What am i doing wrong?

Please, make all indents consistant. That would make it easier to read for me and for yourself.

In the first line, should there be a space after #include ?

The send() function requires a pointer to a string and you want to transmit a single character. Either make an other function for a single character or create a string from the 'Key'.

please give me a little bit of explanation on that,

and sorry for my messed up code,
I am new to programming and i will try to improve that.

I have some questions:
Do you use the newest Arduino software ? Version 1.0.4.
Did you select the right board ?
Did you install the VirtualWire library (in the "libraries" folder next to your projects) ?

About the space after include:

#include<VirtualWire.h>     // no space, not good
#include <VirtualWire.h>    // with space

If you want to transmit a single character, you could add a function:

void send (char *message)
{
  // transmit a string.
  vw_send((uint8_t *)message, strlen(message));
  vw_wait_tx(); // Wait until the whole message is gone
}

void sendChar (char c)
{
  // transmit a single character
  // Create a pointer to the single character,
  // by using the address of the character with: &c
  vw_send((uint8_t *) &c, 1);
  vw_wait_tx(); // Wait until the whole message is gone
}

I have tested it, and after the changes it compiles.

Thanks for helping me.
I have Arduino ver. 1.5.2(beta)
and selected Arduino Uno from the list, COM port is also correct.
Libraries are installed correctly.

the function provided by you to send a single character worked fine.
now its working
but still not able to send a string using the previous "send" function.

but still not able to send a string using the previous "send" function.

But, still no code to show that you are doing that. And no explanation of what happens/fails to happen when you try.

PaulS
I had given the code and the result while transmitting the string of character

#include<VirtualWire.h>
    
    const int numRows = 4;
    const int numCols = 3;
    const int debounceTime = 20;
    
    const char Keymap[numRows][numCols] = {
      {'1','2','3'},
      {'4','5','6'},
      {'7','8','9'},
      {'*','0','#'}
    };
    const int rowPins [numRows] = {7,2,3,6};
    const int colPins [numCols] = {5,8,4};
    void setup()
    {
      Serial.begin(9600);
      for (int row = 0; row < numRows; row++)
      {
        pinMode(rowPins[row],INPUT);
        digitalWrite(rowPins[row],HIGH);
    }
    for(int column = 0; column < numCols; column++)
    {
      pinMode(colPins[column],OUTPUT);
      digitalWrite(colPins[column],HIGH);
    }
    vw_setup(2000);
        }
        
        
    void loop()
    {
     char Key = getKey();
      send (Key);
    }
    char getKey()
    {
      char Key = 0;
      for(int column = 0; column < numCols; column++)
      {
        digitalWrite(colPins[column],LOW);
        for(int row = 0; row < numRows; row++)
        {
          if(digitalRead(rowPins[row])== LOW)
          {
            delay(debounceTime);
            while(digitalRead(rowPins[row])== LOW);
            Key = Keymap[row][column];
          }
        }
        digitalWrite(colPins[column],HIGH);
      }
      return Key;
    }
  void send (char *message)
{
vw_send((uint8_t *)message, strlen(message));
vw_wait_tx(); // Wait until the whole message is gone
}

This is the error my compiler is showing up.

remote_tx.ino: In function 'void loop()':
remote_tx:35: error: invalid conversion from 'char' to 'char*'
remote_tx:35: error: initializing argument 1 of 'void send(char*)'

but still not able to send a string using the previous "send" function.

Because you are NOT trying to send a string. You are STILL trying to send a single character. A string is a NULL terminated array of characters. The minimum length of a string is 0 characters. If the string is to have any meaning, though, it must have at least one character in it. That one character plus a terminating NULL requires TWO elements in an array. You can NOT stick two characters in on char variable.

So, re-write your code to call the function with strings OR rewrite the function to expect a character. Which you do depends on how you make up you mind what you are trying to do.

I had similar problems using this library. After resolving my problems I'm making a tutorial in my new blog. Also in the last part of the tutorial i will so how to send multiple variables using virtualwire.

I hope to finish soon. However, the blog is controlrobotics.rodrigomompo.com.