Author Topic: How can I put an mcMod120 in sleep mode for 10 minutes and then run the program?  (Read 57 times)

mc-T2

  • Administrator
  • Sr. Member
  • *****
  • Posts: 252
  • mc-Things! The opportunities are endless!
  • Location: Canada
    • View Profile
Hi Junkboy,

yes, you can insert a 'sleep' function into your code. Check out the attached mcScript guide (Also available on the website) and search through it for the function. I think i remember that it is discussed or displayed on page 23 (and other areas within the document).

The concept would be, to complete what you are asking below, is to raise an event every 60 minutes, insert the sleep function for a certain period of time (I believe the sleep function calculates time in milliseconds so you'll need to do some conversion). Should allow you to do what you are asking below.

Good luck!
Need more mc-Modules, mc-Gateways or other mc-Things? Check out our product page: www.mcthings.com/products. mc-Development kits are available too!
Check out a live Dashboard using mcThings and Losant! Click here: https://goo.gl/ST43hB