How to setup and program an ESP8266 ESP-01?

Hello,

I am trying to program an ESP-01 and i have access to this existing setup from another project but i can't understand these buttons and their purpose.

Is this button a simple click and release type? Or is it a click and hold type? I've never worked with this before.

There is also this button. I'm not sure what it does if pressed and released. Does it hold its new state or does it just create a contact when pressed only?

This is the full setup that i'm trying to figure out for programming the ESP-01 using Arduino IDE 1.8.10. The objective is to control a relay:

The first one looks like a normal momentary microswitch. The second looks like a momentary button as well. Neither of them hold their state. You can check this using a multimeter.

I presume that one of the buttons is the reset button, and the other one is the programming button, connected to GPIO0:

More information at the bottom of this page: https://tttapa.github.io/ESP8266/Chap06 - Uploading.html

That being said, it looks like a very convoluted and cumbersome setup. For just $4, you can get a WeMos D1 mini or similar board that packs everything (USB interface, voltage regulator, programming circuitry, reset button ...) on a single PCB. On top of that, it breaks out all usable GPIO pins of the ESP8266, and you don't have to press any buttons to upload code to it.

Pieter

Boy! You really are trying to do it the hard way!

Here is the programmer adapter for the ESP-01.

Click

This has the programming switch - for half the price you can get it without and attach a jumper.

Here is the relay module:

Click

@PieterP, thank you for the clarification and advice. It is very helpful. I will definitely consider purchasing a WEMOS D1 Mini but for now, i only have an ESP-01 to work with. You have a great tutorial on the ESP-8266 and i'm going through your tutorial page by page: A Beginner's Guide to the ESP8266 to try and understand how to connect the ESP-01 and program it with Arduino IDE.

@Paul__B, thank you for the links but i only have some experience working with the Arduino UNO R3. The ESP8266 is still very new to me. I have an ESP-01 at hand and i'm trying to get things to work on a basic level before controlling a relay. I guess you could say that it's like a... trial by fire? :o

Well, the modules I cited make it perfectly easy to program and use the ESP-01, so that's what I would recommend.

While you are at it, (the modules from eBay take a while to arrive,) get a few more ESP-01s. Generally about $2 each though the D1 Mini is not a lot more (about $3), also dead easy (physically) to program and also has relay modules to match. ESP-01s will do most of the jobs you need.

Patience! :grinning: