Cactus Micro Rev2 ESP Serial Communication

Hello. I’m trying to communicate with ESP via Mega32U4. I successfully upload .bin file with NodeMCU flasher but it doesn’t give any respond. I can’t even communicate simple serial. ESP side sketch file:

#include <ESP8266WiFi.h>

const char* ssid = “ADIisim”;
const char* password = “biseylerbiseyler123”;

void setup()
{
Serial1.begin(115200);
}

void loop()
{
Serial1.println(“Hello”);
delay(1000);
}

Settings (I’m not sure this settings, maybe wrong is here):

I extracting .bin file with Arduino IDE and send to flasher with this settings:
Baudrate: 115200
Flash size: 512kB
Flash speed: 40Mhz
SPI Mode: DIO

Mega32U4 side sketch file:

while(Serial1.available()) {
String character = Serial1.readString();
Serial.println(character);

}

Serial port didn’t give any value. And I don’t know ESP firmware version. I tried firmware update (espduino/esp8266/release at master · AprilBrother/espduino · GitHub) via esptool but it gave connection error. And I can’t erase flash it still gives an error. This time I tried via nodeMcu flasher:

Screenshot:
https://bbs.aprbrother.com/uploads/default/original/1X/7791f29736c716eae76605727e2905fd5ba9c882.png

It succeeds, but I still get no response.

@aprilpea @aprilpeas Do you know the solution?

Did you use Arduino Mega 32u4? Is it Cactus Micro Rev2?

Yes it is Cactus Micro Rev2.

You may need erase flash for the ESP8266 module. nodemcu-flasher can’t do the job. I recommend you try the esptool-ck we modifed instead

Here’s an example for upload esp-programmer to 32u4 with platformio

How to Erase flash for ESP8266

example

esptool -cp /dev/ttyUSB0 -cd nodemcu -ce

Problem had solved in the arduino.stackexchange:

Thanks for update