I use ESP-01 and NodeMCU V2 board for this project. I made this sketch to easily configure wifi connection, gpio, and timer without re-upload the sketch, and also support OTA (Over The Air) Update.
Search on google How to Install ESP8266 in Arduino IDE (Windows, Mac OS X, Linux)).
My sketch collection
Arduino IDE Board Setting
you will need FTDI USB to TTL Serial Board to connect your ESP-01 to PC.
After you upload the sketch, pull out GPIO-0 and reboot.