Maybe you figured this out, but my code was wrong, it should actually be
tmr.alarm( 0, 2000, 0, turnOffLed )
Third parameter is 0==once, 1==repeating
That leads me to ask, what is the 1st parameter of "0" do?
Thanks again
You do know about this reference page, right?
https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en#new_gpio_map
See Timer Module.
But generally avoid using tmr.delay !
Cheers,
John