String ordenes[]=
{ "AT+CWMODE=3",
"AT+CWQAP",
"AT+CWJAP=\"charly\",\"contrase\"",
"AT+CIFSR" ,
"AT+CIPMUX=1",
"AT+CIPSERVER=1,80",
"END"
};
Then writing this on the setup:
int index = 0;
while(ordenes[index] != "END")
{ WIFI1.println(ordenes[index++]);
while ( true)
{ String s = GetLineWIFI();
if ( s!= "") Serial.println(s);
if ( s.startsWith("no change"))
break;
if ( s.startsWith("OK"))
break;
if ( s.startsWith("ready"))
break;
// if (millis()-T >10000) break;
}
Serial.println("....................");
}
The problem is that, when I execute the program, the ESP goes crazy and it doesn't send all of the AT commands, I've tryed to fix this by putting a voltage regulator between the Arduino TX and the ESP RX, but it stills doing the same. Any help or feedback is aprecciated.