This picture will help you to understand more about the ESP device, having understood it you will be able to add more advanced functions to the project.