I have written code on android which works, but it does not work when compiled for a "Generic 8266 board". I have a two dimension char array as String arrays are not accepted on 8266 compiler. It is set up as a set of buffers and a array of pointers pointing to them.
char buffer0[80] ; // storage containers
char buffer1[80] ;
char buffer2[80] ;
char buffer5[80] ;
char buffer6[80] ; // buffer used to transport strings
// Matrix of char buffers using pointers
char *Scans[] = {"buffer0 , buffer1 , buffer2 , buffer3 , buffer4 , buffer5"};
This compiles OK and does not cause stack problems. I did look up the answers on Stackoverflow, but the answers are minus or only work for strings into a single char array, not multi-dimensioned and not out of the array back into a string for printing or using too control a program.
But I have had problems including stack problems error code 28/29 that have not been caught by the compiler, when it is run on the ESP-01 which a ESP8266 based board. I used the #include to compile the code. I have tried
char* strcpy_P(mess,Scans[0]);
mess.toCharArray(buffer0, 80);
mess.toCharArray(Scans[i], 80);
strcpy_P(Scans[i], mess);
Mess is the string I want to put into the array in a variable "i" controlled loop.
I have also tried all the char * to and from strings in https://arduino-esp8266.readthedocs.io/en/latest/PROGMEM.html?highlight=str#functions-to-read-back-from-progmem and none of them work on 8266.
I want to be able to store a compilation of a number of strings into one string. Then copy it into the one of the char arrays (bufferx) within a loop using i to indicate which buffer to put the string into. Each one is from a different wifi station so they cannot be lumped together.
Then remove it from the right array number to print it out as lines in an email. It has to compile on ESP8266WiFi.h and not crash with stack errors as it will be working autonmously with out a serial port to dump errors to.