Flashing Arduino Mega2560 onboard ESP8266

can you flash a program into the mega (switch OFF OFF ON ON OFF OFF OFF)
and run it (switches ON ON ON ON OFF OFF OFF OFF)

Programming the ESP8266

  • Ensure your dip switches are set such that 1-4 and 8 are OFF and 5-7 are ON.
  • Ensure in the Arduino IDE under Tools|Board: it reads "Generic ESP8266 Module"
  • Ensure Tools|Flash Size: is set to "4 MB (FS: 2MB OTA:~1019KB)"
  • Double check it!

to run ESP8266 Set dip switches 1-4 and 7-8 OFF and 5-6 ON.
if you see some odd characters on the serial monitor when reset is pressed it is the ESP8266 startup at 74880baud

the DIP switch can be awkard - use a small screwdriver to move them
I had to use switch cleaner to get good contact
very doubtful about how long the DIP switches will last

helpful wesite LilyGO/Mega-WiFi_R3_ATmega2560_ESP8266