Home > other >  Nodemcu related problems for help
Nodemcu related problems for help

Time:09-24


Station_cfg={}
Station_cfg. Ssid="123456789"
Station_cfg. PWD="1234567890"
Station_cfg. Save=false
Wifi. The sta. Config (station_cfg)
Wifi. The sta. The connect ()
TMR. Alarm (0, 1, 0100 the function ()
Print (
Wifi. The sta. Getip ())
End)

This is my code written lua, but has been show
Stdin: 1: attempt to call the field 'alarm' (a nil value)
Stack traceback:
Stdin: 1: the main in the chunk

What is going on???????
The small white really do not understand,

CodePudding user response:

If not TMR. The create () : alarm (5000, TMR. ALARM_SINGLE, function ()
Print (" hey there ")
End)
Then
Print (" whoopsie ")
End

"Address, https://nodemcu.readthedocs.io/en/master/modules/tmr/#tmrcreate
You use the old version of the firmware??
  • Related