Move master branch from from mios git repo

This commit is contained in:
hek
2014-01-23 00:23:15 +01:00
commit 609d9e5be9
352 changed files with 53418 additions and 0 deletions
@@ -0,0 +1,31 @@
#include <Sleep_n0m1.h>
Sleep sleep;
unsigned long sleepTime; //how long you want the arduino to sleep
void setup()
{
Serial.begin(9600);
sleepTime = 50000; //set sleep time in ms, max sleep time is 49.7 days
}
void loop()
{
delay(100); ////delays are just for serial print, without serial they can be removed
Serial.println("execute your code here");
Serial.print("sleeping for ");
Serial.println(sleepTime);
delay(100); //delay to allow serial to fully print before sleep
sleep.pwrDownMode(); //set sleep mode
sleep.sleepDelay(sleepTime); //sleep for: sleepTime
}