I have idea to deploy Web-server on ESP-01 which will send commands to Arduino via UART. Ex. user can configure software on Arduino using web-interface. This part seems easy.
I also have idea to enable that web-server to update firmware on Arduino via UART. I will use this adapter (1PCS ESP8266 ESP 01 Serial WiFi Wireless Adapter Module 3.3V 5V Esp01 Breakout PCB Adapters|Replacement Parts & Accessories| - AliExpress)
It has RX and TX lines. I plan to take GPIO0 line from it to use it for resetting Arduino.
From software point of view I plan to somehow upload biary file with Arduino firmware to ESP-01, ex. by running FTP-sever there or using GitHub - gmag11/FSBrowser: Full autocontained (on SPIFFS) web server on ESP8266. And later I need somehow to transfer received file to Arduino.
Question: which library to use to flash binary file from ESP-01 to Arduino Nano via UART? Any existing projects which do the same?
I found this thread https://forum.arduino.cc/index.php?topic=584793.0 looks quite complicated. Are there any other solutions? If not, can someone explain step by step how to do that flashing?
Note1. I would like avoid using wire from ESP-01 to reset line of Arduino. There will be PWM and mosfet keys which can cause interference on reset wire. I want to avoid random resets of Arduino. May be it is possible to connect GPIO0 from ESP-01 to any digital input pins of arduino and trigger reset using watchdog? It is just idea, I don’t know if it is possible.
Note2. Because I will have to use hardware UART on Arduino to communicate with ESP-01, I will not be able to use console via USB. So, I will need to know how to establish transparent UART communication through ESP-01. Any ideas how to make it?
Note3. Yes, I know that I could use existing ESP board and it would be much easier. But I’m using terminal adapeter board for Arduino like this Keywish Nano Terminal Expansion Adapter Board for Arduino Nano V3.0 AVR ATMEGA328P with NRF2401+ Expansion Interface DC Power|Integrated Circuits| - AliExpress I could not find board with this type of terminals for ESP32 or ESP8266. Moreover if this idea would be possible, many users could use simple ESP-01 to make their Arduinos possible to update over the air.
Note4. I’m aware of Esp-Link project, but it contains way more than I need. Extracting only necessary part from it doesn’t look that easy. If someone already did something similar, could you please provide any guidance?
If I’m telling something really weird, then I’m sorry, I’m quite new in Arduino and especially in ESP