if not tmr.alarm(0, 5000, tmr.ALARM_SINGLE, function() print("hey there") end) then print("whoopsie") end
Checked firmware version (connected to ESPlorer and pressed reset):
ESP12E default NodeMCU 0.9.5 build 20150318 powered by Lua 5.1.4
Decided to update firmware. Found here that only 9.6 is available precompiled, later ones have to be costum built. Downloaded 9.6 files and uploaded them using ESP8266Flasher.exe
Checked firmware version then:
NodeMCU 0.9.6 build 20150704 powered by Lua 5.1.4
And tested this code sample:
if not tmr.alarm(0, 5000, tmr.ALARM_SINGLE, function() print("hey there") end) then print("whoopsie") end
It worked.
No comments:
Post a Comment