vittorioexp / Sim800L-Arduino-Library-revised

The SIM800L Arduino Library is a simple and easy-to-use library for the SIM800L module, allowing for quick and efficient communication with the module using the Arduino platform.
GNU General Public License v3.0
101 stars 46 forks source link

sendSms problem #17

Open haddadMedAmine opened 4 years ago

haddadMedAmine commented 4 years ago

hi, when I get the number it's ok but when I send to that number it didn't work

numberSms = gsm.getNumberSms(nSms); gsm.sendSms(numberSms,sms);

error : no known conversion for argument 1 from 'String' to 'char*'

aliila1351 commented 4 years ago

can you solve this ?

wilyfreddie commented 4 years ago

Try this:

numberSms = gsm.getNumberSms(nSms);
gsm.sendSms(numberSms.c_str(), sms);