- Define what you want/need
- Break this up in pieces
- Solve each piece
- Join all those pieces together
When you're new, don't start with a separate ESP (ESP-01 to ESP-14) module.
Get yourself a proper development board: NodeMCU - WeMos D1 - WeMos (UNO form factor) - Witty Board
ESP power requirements are 3.3V±10%@350mA
The ESP8266 IS NOT 5V tolerant on ANY pin (see item 5.14 on page 25 of the FAQ)