void sendShadowCommandSeq()

in arduino/plant_reference.ino [180:196]


void sendShadowCommandSeq(char* command, char* checkRes, char* success, char* fail) {
  do {
    if (startsWith(expresslinkResponse, "ERR8", 4)) {
      expresslinkExecuteCommand("AT+CONF EnableShadow=1\n");
      expresslinkExecuteCommand("AT+CONF Shadow1=PlantShadow\n");
    }
    expresslinkExecuteCommand(command);
    retries = 0;
    do {
      delay(2000);
      expresslinkExecuteCommand(checkRes);
      retries++;
    } while (retries<5
             && !startsWith(expresslinkResponse, fail, strlen(fail))
             && !startsWith(expresslinkResponse, success, strlen(success)));
  } while (!startsWith(expresslinkResponse, success, strlen(success)));
}