added loop code at the end of main

This commit is contained in:
aOK 2024-06-09 15:08:12 +03:00
parent da2d6dd2c2
commit bb1349d903
3 changed files with 9 additions and 2 deletions

View file

@ -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;
}
}

View file

@ -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};

View file

@ -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};