-->
Page 1 of 1

Loop function every 5 minutes

PostPosted: Mon Sep 12, 2016 4:59 pm
by obenavidez
Hello, i want to execute a task every 5 minutes in my nodemcu, but i'm newbie, please if you could give me some example about how can i get that working, i will be very thankful.


Sincerely

Re: Loop function every 5 minutes

PostPosted: Tue Sep 13, 2016 12:31 am
by marcelstoer
http://nodemcu.readthedocs.io/en/master ... /#tmralarm

Code: Select allif not tmr.alarm(0, 300000, tmr.ALARM_AUTO, function()
  print("5min is up")
end)
then print("failed to create timer")
end

Re: Loop function every 5 minutes

PostPosted: Thu Mar 16, 2017 11:07 am
by obenavidez
marcelstoer wrote:http://nodemcu.readthedocs.io/en/master/en/modules/tmr/#tmralarm

Code: Select allif not tmr.alarm(0, 300000, tmr.ALARM_AUTO, function()
  print("5min is up")
end)
then print("failed to create timer")
end



Thanks a Lot it really works perfect, i'm sorry for the really late answer but i stopped the project and now i restart it an now i see your answer, thank you again marcelstoer. :D :D :D