Because of the OTA update you need ESP01 with 1MB flash (ESP01S)! In this example I used a 5V usb light. This is my way, you can choose yours. If you don't know how does it work, please don't use it.
Esempi di applicazioni di domotica per ESP01S da usare con Arduino IDE - fremsoft/003-ESP01S ...