cleanup
This commit is contained in:
12
src/main.rs
12
src/main.rs
@@ -16,17 +16,8 @@ fn main() -> ! {
|
|||||||
let dp = arduino_hal::Peripherals::take().unwrap();
|
let dp = arduino_hal::Peripherals::take().unwrap();
|
||||||
let pins = arduino_hal::pins!(dp);
|
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();
|
let mut led = pins.d13.into_output();
|
||||||
|
// NOTE: 115200 @ 16MHz is 3.5% off, try 9600 or 1M if it causes issues (https://wormfood.net/avrbaudcalc.php)
|
||||||
let serial = arduino_hal::default_serial!(dp, pins, 115200);
|
let serial = arduino_hal::default_serial!(dp, pins, 115200);
|
||||||
let mut serial = share_serial_port_with_panic(serial);
|
let mut serial = share_serial_port_with_panic(serial);
|
||||||
|
|
||||||
@@ -35,5 +26,6 @@ fn main() -> ! {
|
|||||||
loop {
|
loop {
|
||||||
led.toggle();
|
led.toggle();
|
||||||
arduino_hal::delay_ms(1000);
|
arduino_hal::delay_ms(1000);
|
||||||
|
ufmt::uwrite!(&mut serial, ".").unwrap_infallible();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user