added loop code at the end of main
This commit is contained in:
parent
da2d6dd2c2
commit
bb1349d903
3 changed files with 9 additions and 2 deletions
|
@ -87,4 +87,9 @@ async fn main(spawner: Spawner) {
|
|||
let _ = spawner
|
||||
.spawn(relay_task(relay_pin, encoder_channel.receiver()))
|
||||
.unwrap();
|
||||
|
||||
loop {
|
||||
esp_println::println!("Bing!");
|
||||
embassy_time::Timer::after(embassy_time::Duration::from_millis(5_000)).await;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
extern crate embassy_executor;
|
||||
|
||||
use crate::confg::Sens;
|
||||
use embassy_sync::{blocking_mutex::raw::NoopRawMutex, channel::Receiver};
|
||||
use embassy_time::{Duration, Timer};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use crate::confg::Sens;
|
||||
|
||||
extern crate embassy_executor;
|
||||
|
||||
use crate::confg::Sens;
|
||||
use embassy_sync::{blocking_mutex::raw::NoopRawMutex, channel::Receiver};
|
||||
use esp_println::println;
|
||||
use hal::gpio::{Gpio2, Output};
|
||||
|
|
Loading…
Reference in a new issue