arduino_blinkrs/src/main.rs

20 lines
354 B
Rust
Raw Normal View History

2022-11-21 06:38:10 +00:00
#![no_std]
#![no_main]
2022-12-11 06:24:24 +00:00
use arduino_hal::delay_ms;
use panic_halt as _;
2022-11-24 05:07:44 +00:00
2022-12-11 06:24:24 +00:00
#[arduino_hal::entry]
fn main() -> ! {
let peripherals = arduino_hal::Peripherals::take().unwrap();
let pins = arduino_hal::pins!(peripherals);
let mut led = pins.d13.into_output();
led.set_high();
2022-11-24 05:07:44 +00:00
loop {
2022-12-11 06:24:24 +00:00
led.toggle();
2022-11-24 06:09:11 +00:00
delay_ms(1000);
2022-11-24 05:07:44 +00:00
}
}