PGTBOOS:
please try to adjust your sendmsg function like this, i believe it should work.void SendMsg(char * myMsg) // << points to your array and that should be enough, a basic c++ method
{
char MsgAndTime[strlen(myMsg) + 10];
strcpy(MsgAndTime, myMsg);
strcat(MsgAndTime, " 1:00 PM");
Serial.println(MsgAndTime);
}
notice only the main calling method is changed the way you would if calling for an array function variable. if it doesnt work then arduino isnt c++ compliant but i dont doubt it wouldnt work like this.
That was pretty much my plan B. But I was going to use (no pointer like in your example ):
void SendMsg(char myMsg)
I have a hard time grasping pointers. I understand how they work, but it's much less intuitive and harder to understand for me. I thought when you passed an array to a function, C always passes it as pointer. Is that right? So what's the difference between these two functions:
void SendMsg(char myMsg)
void SendMsg(char * myMsg)