Last active
November 23, 2023 19:29
-
-
Save noahbliss/d86fcf8f64b6fa901330656636be31c3 to your computer and use it in GitHub Desktop.
pindriver-unexpected-high.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use hal::delay::Delay; | |
use hal::gpio::*; | |
use hal::peripherals::Peripherals; | |
fn main() -> anyhow::Result<()> { | |
hal::sys::link_patches(); | |
let delay = Delay::new_default(); | |
let peripherals = Peripherals::take()?; | |
let mut led = PinDriver::output(peripherals.pins.gpio42)?; | |
led.set_low()?; | |
println!("pindriver run, waiting 1 second before loop."); | |
delay.delay_ms(1000); | |
loop { | |
println!("garbage"); | |
delay.delay_ms(1000); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment