Deep Sleep Timer u64
This commit is contained in:
+3
-3
@@ -35,7 +35,7 @@ pub const HOHENWALDECK: &str = "COSMOTE-C90C60";
|
|||||||
|
|
||||||
pub const KEFALOVRYSO: &str = "WLAN-732533";
|
pub const KEFALOVRYSO: &str = "WLAN-732533";
|
||||||
|
|
||||||
pub const DEEP_SLEEP_TIME: u16 = 300;
|
pub const DEEP_SLEEP_TIME: u64 = 300;
|
||||||
|
|
||||||
use embedded_dht_rs::dht22::Dht22;
|
use embedded_dht_rs::dht22::Dht22;
|
||||||
use esp_radio::{
|
use esp_radio::{
|
||||||
@@ -136,9 +136,9 @@ async fn main(_spawner: Spawner) -> ! {
|
|||||||
|
|
||||||
println!("{:?} {:?}", reason, wake_reason);
|
println!("{:?} {:?}", reason, wake_reason);
|
||||||
|
|
||||||
let timer = TimerWakeupSource::new(core::time::Duration::from_secs(30));
|
let timer = TimerWakeupSource::new(core::time::Duration::from_secs(DEEP_SLEEP_TIME));
|
||||||
|
|
||||||
let mut ticker = Ticker::every(Duration::from_millis(500));
|
let mut ticker = Ticker::every(Duration::from_millis(200));
|
||||||
loop {
|
loop {
|
||||||
ticker.next().await;
|
ticker.next().await;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user