Initial commit
This commit is contained in:
27
src/main.rs
Normal file
27
src/main.rs
Normal file
@@ -0,0 +1,27 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use panic_halt as _;
|
||||
|
||||
#[arduino_hal::entry]
|
||||
fn main() -> ! {
|
||||
let dp = arduino_hal::Peripherals::take().unwrap();
|
||||
let pins = arduino_hal::pins!(dp);
|
||||
|
||||
/*
|
||||
* For examples (and inspiration), head to
|
||||
*
|
||||
* https://github.com/Rahix/avr-hal/tree/main/examples
|
||||
*
|
||||
* NOTE: Not all examples were ported to all boards! There is a good chance though, that code
|
||||
* for a different board can be adapted for yours. The Arduino Uno currently has the most
|
||||
* examples available.
|
||||
*/
|
||||
|
||||
let mut led = pins.d13.into_output();
|
||||
|
||||
loop {
|
||||
led.toggle();
|
||||
arduino_hal::delay_ms(1000);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user