Hi
I am using GitHub - stevemarple/IniFile: Arduino library to parse ini files. library to create a config ini used at arduino start up.
If I call the function like below it works fine
if (ini.getValue("HSCOMMANDS", "command2", buffer, bufferLen)) {
myStrings[2] = buffer;
}
it works fine. I have about 64 items to set in the array, So I would like to loop through the ini file and concatenate a variable and the loop counter and pass that to the function, however I am getting a
HttpRequestHomeSeerPost:140: error: no matching function for call to 'IniFile::getValue(const char [11], String&, char [80], const size_t&)' error
here is my code
for (int j=0; j<=63; j=j+1) {
String thisString = "command" ;
String myJ = String(j) ;
String mypass = thisString + myJ ;
//Serial.print(mypass);
if (ini.getValue("HSCOMMANDS", mypass, buffer, bufferLen)) {
myStrings[j] = buffer;
Serial.print(myStrings[j]);
}
}
how should I pass the variable mypass into the function????
thanks for all help
jasemilly