2

I am using Cactus Micro Rev2 and I'm trying to communicate with ESP via Mega32U4. I guess I have to update to espduino to be able to program the ESP side.

And I don't know current ESP firmware version. I tried firmware update (https://github.com/AprilBrother/espduino/tree/master/esp8266/release) 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: enter image description here

It succeeds. But when I uploaded the basic serial communicate sketch to ESP and Mega32U4 side, I still don't get a response.

ESP side sketch:

{
Serial1.begin(115200);
}

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

MEGA32U4 side sketch:

String character = Serial1.readString();
Serial.println(character);
}

Believe me, I don't know exactly where I went wrong. I wrote more descriptive, but I was asked to ask one question. In short, how exactly can I update to espduino via NodeMCU flasher?

0
1

The Cactus Micro Rev2 board has ATmega32u4 with LiliPad bootloader as main MCU and esp8266 as WiFi adapter.

The esp8266 UART is connected to 32u4 Serial1. The Serial on 32u4 is connected to computer over USB.

To bridge the esp8266 to computer you can use the SerialPassthrough sketch from Communication section of base Arduino IDE examples in File menu.

The manufacturer of the board made a sketch for the ATmega32u4 which sets the esp8266 to bootloader mode and bridges the esp8266 to USB.

The esp8266Programmer.ino sketch is basically a SerialPassthrough sketch with reset of the esp8266 to bootloader mode in setup().

Select "Arduino LiliPad USB" in Arduino IDE the upload the esp8266Programmer.ino sketch to the 32u4.

With the esp8266Programmer.ino in 32u4 you can upload to esp8266 with Arduino IDE or esptool.py.

If you want to communicate with the application (firmware or sketch) in esp8266, use the SerialPassthrough sketch from Arduino IDE examples (because the esp8266Programmer sketch always sets the esp8266 to bootloader mode).

For successful upload from IDE or esptool.py over the esp8266Programmer sketch, the reset before uploading must be suppressed. In IDE it is the "Reset method" option (select no_dtr), for esptool.py it is the --before no_reset option.

1
2

The board has an esp-03. First, we uploaded esp8266programmer.ino and then uploaded the esp sketch from IDE. Our esp settings must be like this:

Flash Size: "1MB (none OTA)
Flash Mode: "DIO"
Reset method: "no dtr (aka ck)"

We uploaded our sketch. The Atmega sketch must have this two lines of code in the setup() function:

digitalWrite(program_pin, HIGH); //Set GPIO to boot into programming mode
digitalWrite(enable_pin, HIGH); //Enable ESP-03 module

The serial baud rate must be less than 74880. This way, the problem will be solved. Thanks to @Juraj for the support.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.