Skip to content

Commit

Permalink
Added weatherSensor.sleep() to all examples with sleep mode (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs authored Jan 19, 2025
1 parent c4444ed commit f181d10
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,12 @@ void loop()
#ifdef LED_EN
pinMode(LED_GPIO, INPUT);
#endif
// Note:
// Further reduction of sleep current might be possible by
// controlling the GPIO pins (including SPI CS) appropriately.
// This depends on the actual board/radio chip used.
// See
// https://github.com/jgromes/RadioLib/discussions/1375#discussioncomment-11763846
weatherSensor.sleep();
ESP.deepSleep(SLEEP_INTERVAL * 1000);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,13 @@ void loop()
#ifdef LED_EN
pinMode(LED_GPIO, INPUT);
#endif
weatherSensor.sleep();
// Note:
// Further reduction of sleep current might be possible by
// controlling the GPIO pins (including SPI CS) appropriately.
// This depends on the actual board/radio chip used.
// See
// https://github.com/jgromes/RadioLib/discussions/1375#discussioncomment-11763846
weatherSensor.sleep();
ESP.deepSleep(SLEEP_INTERVAL * 1000);
}
} // loop()
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,13 @@ void loop()
#ifdef LED_EN
pinMode(LED_GPIO, INPUT);
#endif
weatherSensor.sleep();
// Note:
// Further reduction of sleep current might be possible by
// controlling the GPIO pins (including SPI CS) appropriately.
// This depends on the actual board/radio chip used.
// See
// https://github.com/jgromes/RadioLib/discussions/1375#discussioncomment-11763846
weatherSensor.sleep();
ESP.deepSleep(SLEEP_INTERVAL * 1000);
}
} // loop()
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,13 @@ void loop()
#ifdef LED_EN
pinMode(LED_GPIO, INPUT);
#endif
// Note:
// Further reduction of sleep current might be possible by
// controlling the GPIO pins (including SPI CS) appropriately.
// This depends on the actual board/radio chip used.
// See
// https://github.com/jgromes/RadioLib/discussions/1375#discussioncomment-11763846
weatherSensor.sleep();
ESP.deepSleep(SLEEP_INTERVAL * 1000);
}
} // loop()

0 comments on commit f181d10

Please sign in to comment.