Inside my main loop there is this string:
String string1;
I have a function that will take string1 as parameter, and use it to send this string as SMS.
sendSMS(string1);
This is the sendSMS() function (without parameters):
void sendSMS()
{ sms.beginSMS(remoteNumber);
sms.print(finalstr);
sms.endSMS();
lcd.setCursor(0, 0);
lcd.print("Message sent!");
delay(10000);
}
My questions are:
- How do I put the string input parameter in sendSMS?
- Do I also need to use a function prototype for sendSMS()? (so that it appears three times, 1 in the prototype, 1 in the declaration and one in the call). Or I don't need to use function prototype before the main loop()?