Hey guys i know this is a easy question however my brain cant seem to work it out!! Basically i want to send a different text message based on the "Case" which is the keypad input, however im not sure how to declare the text message itself as its not working this way! the character array txtMsg is located within the SMSsend(); function!
switch (key)
{
case '*':
digitalWrite(ledpin, LOW);
break;
case '#':
digitalWrite(ledpin, HIGH);
break;
case '1':
{
char txtMsg[200]='Hello1';
SMSsend();
break;
}
case '2':
{
char txtMsg[200]='Hello2';
SMSsend();
break;
}
case '3':
{
char txtMsg[200]='Hello3';
SMSsend();
break;
}
case '4':
{
char txtMsg[200]='Hello4';
SMSsend();
break;
}