This commit is contained in:
2025-07-18 20:31:23 +01:00
parent 55aebb5db2
commit 3ba13263f7

View File

@@ -16,17 +16,8 @@ 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();
// 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 mut serial = share_serial_port_with_panic(serial);
@@ -35,5 +26,6 @@ fn main() -> ! {
loop {
led.toggle();
arduino_hal::delay_ms(1000);
ufmt::uwrite!(&mut serial, ".").unwrap_infallible();
}
}