Contact us by email if you have any questions!

Put Arduino Into Sleep Mode and Works for Weeks

It’s pretty useful when you have a arduino project run a long time when it is fully set up, now you can read about this on this post to get a fully explanation, will be pretty useful for sensor monitoring, wireless things, etc.

Get the JeeLib here. And use the following example code, sleepy function is replaced the delay(1000) function to get the arduino in sleep mode.

#include <JeeLib.h>  // Include library containing low power functions
int led = 13;
ISR(WDT_vect) { Sleepy::watchdogEvent(); } // Setup for low power waiting

void setup() {
  pinMode(led, OUTPUT);

void loop() {
  digitalWrite(led, HIGH);
  Sleepy::loseSomeTime(1000);      // Instead of delay(1000);
  digitalWrite(led, LOW);
  Sleepy::loseSomeTime(1000);      // Instead of delay(1000);

This post is refer to hardware startup blog, click here to see the original post.


4 Replies to “Put Arduino Into Sleep Mode and Works for Weeks”

  1. hof says:

    Why did you steal an article straight off without even checking the contents of the article?

    Do you think this line of code will work?
    #include // Include library containing low power functions

  2. Chao says:

    Hello Hof,

    Indeed, I shouldn’t do so, just deleted the article but left the code.

  3. poulbran says:

    That would be great for H2O monitoring on a farm.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.