tmr.delay(xxx) fails
Posted: Sat Jan 03, 2015 8:20 pm
Was working on my esp8266 with the lua code loaded and ran into an interesting issues. I am using rom NodeMcu 0.9.4 build 20141230 powered by Lua 5.1.4
The following program runs with no issues.
while 1 do
print("led on")
tmr.delay(2000000)
print("led off")
tmr.delay(2000000)
end
If I change the delay line tmr.delay(200000) the esp8266 seems to crash and restart.
Below is the esplorer push to chip and chip running along with the error.
> node.restart()
NodeMcu 0.9.4 build 20141230 powered by Lua 5.1.4
nil
>
while 1 do
print("led on")
>> tmr.delay(200000)
print("led off")
tmr.delay(200000)
>> end
led on
led off
led on
led off
led on
led off
led on
led off
led on
led off
led on
led off
NodeMcu 0.9.4 build 20141230 powered by Lua 5.1.4
nil
>
The following program runs with no issues.
while 1 do
print("led on")
tmr.delay(2000000)
print("led off")
tmr.delay(2000000)
end
If I change the delay line tmr.delay(200000) the esp8266 seems to crash and restart.
Below is the esplorer push to chip and chip running along with the error.
> node.restart()
NodeMcu 0.9.4 build 20141230 powered by Lua 5.1.4
nil
>
while 1 do
print("led on")
>> tmr.delay(200000)
print("led off")
tmr.delay(200000)
>> end
led on
led off
led on
led off
led on
led off
led on
led off
led on
led off
led on
led off
NodeMcu 0.9.4 build 20141230 powered by Lua 5.1.4
nil
>