problem with esp8266, lua, conectivity with iphone or ipad, ineraction w/arduino

hi all, i am using nodemcu. please do not use much technical language as i am a beginner lol.

1.i have a esp-01 all connected with lua on it to control two leds and is working fine. But when i disconnect the power and

reconnect it, esp hangs and both the leds are on.So i just pull out the cables from gpio 0 and gpio2 and reconnect the

esp-01 it works fine and i have to put the wires back in gpio 0 and 2 again after a few seconds to make it work again. is

there a solution to this problem?

  1. i have an iphone and ipad. whenever i try to connect either of them to the esp it shows little tick mark before the name

but it never connects to the server page . when i go to the configuration page iy shows the following

  4. DNS ??????

NOTHING IS SHOWN IN THE DNS FIELD ....... how can i get dns from esp?

  1. a few days ago i made a project on arduino that controlled 8 digital pins via bluetooth. i am using those pins to control relays for home automation. now i want to take it a step further and control it by lua webserver on esp-01.
    all i want to do is to toggle pins on arduino via webserver on esp..... is it possible? if yes then is there a tutorial on

any website? i tried hard but couldnt find one. all i came across was ESP8266 Arduino LED Control – Control Digital Pins From Webpage

led-control-from-webpage/ but dont know where to upload the code as i want to use esp-01 to be a webserver and accessable

from any device.

  1. can i make a authentication page on lua firmware.... please guide me to the code.