#define SSID "ESSID"
#define PASS "passW0rd"
SoftwareSerial dbgSerial(1, 0); // RX, TX
int led = 4;
void setup()
{
pinMode(led, OUTPUT);
dbgSerial.begin(9600);
dbgSerial.println("AT+RST");
delay(2000);
dbgSerial.println("AT");
delay(2000);
dbgSerial.println("AT+CWMODE=3");
delay(2000);
String cmd="AT+CWJAP=\"";
cmd+=SSID;
cmd+="\",\"";
cmd+=PASS;
cmd+="\"";
dbgSerial.println(cmd);
delay(2000);
dbgSerial.println("AT+CIPMUX=1");
delay(2000);
dbgSerial.println("AT+CIPSERVER=1,80");
}
void loop()
{
code ...
}
if i connect my esp-01 to a serial-usb, and type by hand each command, it works, but if i run the code, works all except the last command, the cipserver. Have try with other port,delay, delay, new firmwares ...
By hand, cipserver works, with code it doesn't, please help me.