node.sleep - does not work for me
Posted: Mon Feb 12, 2018 2:58 pm
Can't figure out, why this is not working.
->file.writeline([==[cfg={}]==]) -> ok
->file.writeline([==[cfg.duration=10*1000*1000 -- 10 sec]==]) -> ok
->file.writeline([==[cfg.wake_pin=3]==]) -> ok
->file.writeline([==[]==]) -> ok
->file.writeline([==[node.sleep(cfg)]==]) -> ok
->file.flush() -> ok
->file.close() -> ok
->dofile("main.lua") -> send without checkdofile("main.lua")
main.lua:37: attempt to call field 'sleep' (a nil value)
stack traceback:
main.lua:37: in main chunk
[C]: in function 'dofile'
stdin:1: in main chunk
---------
NodeMCU custom build by frightanic.com
branch: master
commit: 5073c199c01d4d7bbbcd0ae1f761ecc4687f7217
SSL: true
modules: ds18b20,file,gpio,net,node,ow,pwm,tmr,uart,wifi,tls
build built on: 2018-02-12 15:30
powered by Lua 5.1.4 on SDK 2.1.0(116b762)
->file.writeline([==[cfg={}]==]) -> ok
->file.writeline([==[cfg.duration=10*1000*1000 -- 10 sec]==]) -> ok
->file.writeline([==[cfg.wake_pin=3]==]) -> ok
->file.writeline([==[]==]) -> ok
->file.writeline([==[node.sleep(cfg)]==]) -> ok
->file.flush() -> ok
->file.close() -> ok
->dofile("main.lua") -> send without checkdofile("main.lua")
main.lua:37: attempt to call field 'sleep' (a nil value)
stack traceback:
main.lua:37: in main chunk
[C]: in function 'dofile'
stdin:1: in main chunk
---------
NodeMCU custom build by frightanic.com
branch: master
commit: 5073c199c01d4d7bbbcd0ae1f761ecc4687f7217
SSL: true
modules: ds18b20,file,gpio,net,node,ow,pwm,tmr,uart,wifi,tls
build built on: 2018-02-12 15:30
powered by Lua 5.1.4 on SDK 2.1.0(116b762)