I'm new to hardware world. I used esplorer to code my lua scripts for ESP8266. I had a init.lua file with a web server running. I wanted to do a GPIO read based on timer. So to test out the GPIO read and timer, i created a new file script1.lua and had the following code.
status = 0
pin = 3
gpio.mode(pin,gpio.INPUT)
gpio.write(pin,gpio.LOW)
function timer()
counter = 0
for i= 1,100 do
counter = counter + gpio.read(pin)
print(counter)
end
print("*****")
print(counter)
if(counter > 60) then
status = 1
else
status = 0
end
end
timer()
Once i flashed it to ESP8266, esplorer was hung and it was not responding for few seconds.. After that i'm unable to execute any command in ESP8266.. The blue light in ESP8266 that used to blink when any command is executed is not blinking now..
The web server that was in init.lua is also not responding.
The red light is always on. The blue light blink two times in the beginning. Tried flashing NodeMCU, but same result.
What could be the potential cause and any solution for it??
Thank You