So this way is working good, but now i wish to make a function that send a signal but with different code, like "A9", "B9", "C9"...
So i tought to code something like that:
char *msgRF;
...
void loop(){
sendSignal("A");
}
...
void sendSignal(String ID){ //I tried char ID and still don't work
msgRF = ID+"9";
...
vw_send((uint8_t *)msgRF, strlen(msgRF));
}
But i'm having errors. I do not really understant the *... I can code msgRF = "string"; but can't do msgRF = ID+"string"... How can I program this, I need to keep the char *msgRF
those are the king of error I got
BlindAutomation_get_state.ino:53:14: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
BlindAutomation_get_state.ino:53:9: error: cannot convert 'StringSumHelper' to 'char*' in assignment
Like I said i'm more a java/vb programmer so c/c++ are a bit different.
It's enough to hold all the characters that you said the message should be, plus the terminating NULL, without being too big. If you change the message, you need to increase or decrease that value, to provide enough space.
ok. out of those 8 how many do I need for the terminating null (or how many are for my message on those 8) ? So I can know how much increase for a bigger message.
If ID is "G", that's one byte. The "9" is one byte. So, technically, the array size could be 3. But, I never like odd numbers for array sizes. So, the minimum, in my opinion only, should be 4.