[esp] Add Rust no-std example.
This commit is contained in:
@@ -21,11 +21,11 @@ fn main() -> anyhow::Result<()> {
|
||||
|
||||
println!("Starting duty-cycle loop");
|
||||
let max_duty = channel.get_max_duty();
|
||||
// Cycle the channel duty every 2s to visually show that things are working when flashed.
|
||||
// Cycle the channel duty every 500ms to visually show that things are working when flashed.
|
||||
for numerator in [0, 1, 2, 3, 4, 5].iter().cycle() {
|
||||
println!("Duty {numerator}/5");
|
||||
channel.set_duty(max_duty * numerator / 5)?;
|
||||
FreeRtos::delay_ms(2000);
|
||||
FreeRtos::delay_ms(500);
|
||||
}
|
||||
|
||||
// We want this to run forever, so don't let the application terminate.
|
||||
|
||||
Reference in New Issue
Block a user