433 Sender module

hi
this code for Send 'Number' with 433Mhz Module
but code noting compile and show this error: invalid conversion from 'char*' to 'long unsigned int' [-fpermissive]

my code:

#include <Keypad.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
LiquidCrystal_I2C lcd(0x27,16,2);
const byte ROWS = 4;
const byte COLS = 3;
char keys[ROWS][COLS] = {
{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'*','0','#'}
};
byte rowPins[ROWS] = {5, 4, 3, 2};
byte colPins[COLS] = {8, 7, 6};

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
const byte maxKeys = 10;
char storedKeys[maxKeys];
byte keyIndex = 0;

void setup(){
Serial.begin(9600);
mySwitch.enableTransmit(10);
mySwitch.setRepeatTransmit(15);
lcd.init();
lcd.backlight();
}

void loop()
{
char key = keypad.getKey();

if(key != NO_KEY)
{
if (key == '*')
{
lcd.clear();
mySwitch.send(storedKeys,24);
lcd.print(storedKeys);
}
else if(key == '#')
{
keyIndex = 0;
lcd.clear();
lcd.print("Reset success!");
}
else
{
if(keyIndex < maxKeys)
{
storedKeys[keyIndex++] = key;
storedKeys[keyIndex] = '\0';
}
}
}
}

show this error: invalid conversion from 'char*' to 'long unsigned int'

It shows more than that. It shows the line number and column number where the problem occurred.

RCSwitch mySwitch = RCSwitch();

is wrong.

RCSwitch mySwitch;

is right.

If the problem involves the RCSwitch class, post a link to the library.

not working :confused:

attack my library.

RCswitch.zip (15.8 KB)

The library has two methods to send data:

    void send(unsigned long Code, unsigned int length);
    void send(char* Code);

You are trying to pass a character array to the first method. The method that takes a char array doesn't need the length, because it can determine it.

Well وme what to do?
i need this code!
please repair the code
i want Send number!
please help me

Well وme what to do?

mySwitch.send(storedKeys);

but if not use 24 from this code ~> mySwitch.send(storedKeys,24);
not working
this code success: mySwitch.send(storedKeys); but not Send because need '24'
!? :confused:

3ertegh:
but if not use 24 from this code ~> mySwitch.send(storedKeys,24);
not working
this code success: mySwitch.send(storedKeys); but not Send because need '24'
!? :confused:

Because as you can see from the function prototype above, mySwitch.send(storedKeys,24); passes an unsigned long type not a char*. PaulS already told you, the function knows the length of the char array by looking at it.