Hello again folks,
Well, I've been scolded for no address pointers and strcatting them and the like probably causing a SF or something... so I thought I had the solution to declare an char array for a char pointer and use that address:
Here is one function when I have two pointers and two char array addresses... but where am I going wrong?
void beepRepeatSet() {
//BeepRepeatSet: Add 1x000 where x is 2^(x-1) times to repeat
char *hertzA; <--- DECLARE ptr
char h[10]; <--- DECLARE char array
char r[10];
hertzA = &h; <-- Assign address of h to hertzA results in error...
char *hertzR;
hertzR = &r;
int hertzI, hertzLen;
hertzA = reinterpret_cast<char *>(hertz); //Convert long to char*
hertzLen = strlen(hertzA);
hertzR = hertzA;
hertzI = atoi(hertzR);
beepRepeat = 2 ^ (hertzI - 1);
if ((hertzI < 2) || (hertzLen < 6)) beepRepeat = 0;
//Serial.println(beepRepeat);
}