Hello,
I use this library of watchdogtimer:
https://evothings.com/watchdog-timers-how-to-reduce-power-usage-in-your-arduino-projects/
If there is a better solution ,can you mention me?
I would like to know how to sleep the entire system for 1h or 2h and wake up only max 10 sec.
It just should mesure the distance of an object and then go to sleep.
void setup () {
pinMode(GREEN, OUTPUT); // initialize the BLUE LED pin as an output
Serial.begin(9600);
pinMode(pwPin, INPUT); // SENSOR
pinMode(pwPin1,OUTPUT); //Voltage of the sensor
digitalWrite(pwPin1, HIGH); // ON voltage of the sensor
}
void loop ()
{
// HERE I introduce my initialisation of code (+ measurements with the sensor)
.......
.......
digitalWrite(pwPin1, LOW); //VOLTAGE OFF the sensor
delay(3600000); ----> )NSTEAD DOING AN DELAY I would like to sleep the system for 1h and wake up the system max to 10 sec
}
Thanks for you help