-
Notifications
You must be signed in to change notification settings - Fork 9
Unbrick
To write an Atmega program received over WiFi into ATmega, the ESP must be connected to Atmega's serial pins. For this to work there is a direct serial to serial connection on UNO WiFi Developer Edition. The electronic switch which connects this serial to serial is controlled with GPIO4 of the ESP8266. There is a pull-up resistor to hold the switch in position for normal USB to ATmega connection for RX and TX, but if the code in esp8266 sets io 4 as OUTPUT, then the pin is pulled LOW and the switch connects esp8266 to ATmega. The USB chip isn't connected to ATmega and no upload of new sketch to ATmega and consequently no upload to esp8266 is possible.
To stop esp8266 code to run and set io 4 LOW, put the esp8266 in bootloader mode with the B/L button. Hold the button while connecting to board to power. Reset button will not work, it only resets the ATmega (unless the current ATmega sketch uses Serial1.reset() in setup()).
Then you can upload EspProxy sketch to allow upload to esp8266 to get rid of the rogue code in esp8266, but EspProxy would reset the esp8266 and again start the code which sets io 4 LOW. So run the EspProxy in FLASHING mode to put esp8266 immediately to flashing mode.