Skip to content

How to flash ESP8266 ESP‐01S WiFi module

alf45tar edited this page Oct 20, 2018 · 7 revisions

ESP-01S module is usually shipped with AT-Command firmware and flashing a new firmware requires an USB to Serial adapter as outlined here.

Pedalino can upload firmware to ESP-01S without any hardware addition or modification. Pedalino uses Arduino Mega as USB to Serial adapter (bidirectional serial passthrough between Serial and Serial3 ports).

Preliminary operations

  • Boot Arduino in serial passthrough mode

    • Press and hold RIGHT button on LCD Keypad Shield
    • Press and release RST button
    • Release RIGHT when one or more # sign appear on LCD
  • Boot ESP-01S in flash mode

    • Press and hold Flash button
    • Press and release Reset button
    • Release Flash button (the ESP01S built-in led will flash shortly)

Continue with PlatformIO or Arduino IDE as you prefer.

PlatformIO

  • Install PlatformIO IDE for VSCode
  • Run the following commands from View->Command Palette (Ctrl+Shift+P)
    • Git: Clone
    • You will be asked for the URL of the remote repository (https://github.com/alf45tar/Pedalino) and the parent directory under which to put the local repository.
    • PlaftormIO: Build
    • Open platformio.ini and set upload_port in [env:esp01_1m] equal to your Arduino COM port
    • PlatformIO: Upload

Arduino IDE

  • Install the current upstream Arduino IDE at the 1.8 level or later. The current version is at the Arduino website
  • Start Arduino and open Preferences window
  • Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.
  • Open Boards Manager from Tools->Board menu and install esp8266 platform
  • Select Generic ESP8266 Module board from Tools->Board menu after installation
  • Set the board parameters as follow

  • Load PedalinoESP sketch
  • Select Sketch->Upload (Ctrl+U)

Post upload operations

  • Reset Arduino Mega
  • Reset ESP-01S
  • Enjoy your Pedalino

USB to Serial adapter mode is required just for the first firmware update. Once connected to WiFi the ESP-01S module can be updated connecting your browser to http://pedalino.local/update.