ESP-01S - Beginner

Two buttons? The ESP-01 has no buttons.

How are you flashing it?

This is what I use:

GPIO ports:
The ESP8266-01 has four GPIO pins.
GPIO0 must be high on boot, otherwise the ESP will go into the flash mode.
GPIO2 is a general-purpose GPIO port.
GPIO1 is the RX pin and must be high on boot.
GPIO3 is the Tx pin, and is general-purpose.

To use TX/RX for GPIO, add this to your code at the beginning of void setup():

pinMode(1, FUNCTION_3);   //Use Tx as GPIO1
pinMode(3, FUNCTION_3);   //Use Rx as GPIO3

You will no longer be able to use the Serial Monitor as TX will now be a GPIO pin and not transmit Serial data. You can still Flash your device as when you boot the device in flash mode it converts GPIO1 and GPIO3 back to TX/RX. Once you reboot into regular running mode GPIO1 and GPIO3 will go back to being GPIO pins.

To change GPIO1 and GPIO3 back to being TX/RX for regular Serial Monitor use, add this to your code at the beginning of void setup():

pinMode(1, FUNCTION_0);   //Use GPIO1 as Tx
pinMode(3, FUNCTION_0);   //Use GPIO3 as Rx