LH
  • Projects
  • Build

ESP-01S Getting Started

This is a quick guide to getting set up and started with the ESP-01S microcontroller. Actually, I believe the correct terminology is that this is an ESP8266; this specific board that the microcontroller comes on is the ESP-01S.

I'm not planning to do anything exciting with it, probably only IoT projects. For example, I want to add my standard door bell to Home Assistant so I can get notifications when someone presses the button. If you want to do more than this then you should go to ESP-32 which has dual core, more interfaces and more GPIO pins.

There are many guides out there but the usual problem is finding one with the right level for you. I'm an electronic engineer who can develop software so this is a guide for someone like me who just wants to see it working before committing to a bigger project.

I bought a handful of ESP-01S. Should you buy the ESP-01 variant? I can't see a good reason unless you happen to need a lot of them, you don't need the extra features of the 01S and somehow you can get a much better price.

How do you know you have ESP-01S and not ESP-01? The ESP-01S has only one tiny LED near the WiFi antenna.

ESP01S LED

ESP-01S Single LED, Highlighted

If you are just starting then it might be easier to get a specific dev board like the WeMos D1 Mini or ESP-12E. By itself, it is not possible to communicate and program the ESP-01S. I bought a USB serial programmer but you need to modify it to ground GPIO0 in order to set the ESP into programming mode. I found a tutorial on how to add a switch to do that and it looked quite neat so I followed their suggestion, using hot glue to stick the switch to the side.

ESP01S programmer mod

Yes, I fixed that Solder Work after Seeing this Photo


When plugging the USB programmer into your USB port, here is the output on dmesg:

ch341 1-4:1.0: ch341-uart converter detected

Here is the output of lsusb:

Bus 001 Device 006: ID 1a86:7523 QinHeng Electronics CH340 serial converter

Now let's run some simple code.

  1. Download and install the Arduino IDE. I prefer to use AppImage version. After downloading I used chmod to set it to executable.
  2. Run the Arduino IDE.
  3. Add the ESP8266 to the "Additional Board Manager URLs" found in Preferences, http://arduino.esp8266.com/stable/package_esp8266com_index.json.
  4. Go to Tools/Board/Boards Manager; search for and install the ESP8266 module.
  5. Select the ESP8266 board via the Tools/Board menu.
  6. Go to File/Examples/01.Basics and choose the blink sketch.
  7. Insert the USB programmer into a port on your computer while pressing the button then let go.
  8. Click the right arrow to compile and upload the sketch.
  9. Wait for the sketch to compile and be 100% uploaded.
  10. Pull the programmer out and re-insert it, this time without pressing the button.

The small LED on your ESP-01S should now flash. Success!

< Back