Hi
I have just received my new Cactus micro 2. But I am not able to connect to the ESP8266.
The code looks like:
String tmp;
#define BAUD_RATE 9600
void setup() {
Serial.begin(BAUD_RATE);
Serial1.begin(BAUD_RATE);
Serial.println("Hello Cactus Micro!");
// Enable esp8266
pinMode(13, OUTPUT);
digitalWrite(13, HIGH);
delay(1000);//delay
};
void loop() {
//set mode needed for new boards
Serial1.println("AT+RST");
delay(3000);//delay after mode change
Serial1.println("AT+CIPMUX=0");
delay(300);
Serial1.println("AT+CIPMODE=3");
delay(300);
Serial1.println("AT+RST");
delay(500);
Serial1.println("AT+CWMODE=1");
delay(500);
Serial1.println("AT+GMR");
ShowSerialData();
delay(500);
Serial.println("Setup done");
}
void ShowSerialData() {
//output everything from ESP8266 to the Arduino Micro Serial output
while (Serial1.available() > 0) {
tmp += char(Serial1.read());
delay(2);
}
if(tmp.length() > 0) {
Serial.println(tmp);
tmp = "";
}
}
My monitor only keeps showing Setup done.
The setup is USB connection only.
Board lilipad arduino USB
I have tried different baudrates and still no results.
I have also tried hardwareSerialMonitor.ino without any luck.
Please help.