From 37c7e048203a4fb8849ec1f1e7af62ba681d8de6 Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Sat, 20 Jul 2024 11:21:16 -0400 Subject: [PATCH] Turn on the built-in LED when software starts up --- bike-lights/bike/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bike-lights/bike/src/main.rs b/bike-lights/bike/src/main.rs index c9fa1ad..a6e9d7f 100644 --- a/bike-lights/bike/src/main.rs +++ b/bike-lights/bike/src/main.rs @@ -8,7 +8,7 @@ use az::*; use core::cell::RefCell; use cortex_m::delay::Delay; use embedded_alloc::Heap; -use embedded_hal::{blocking::spi::Write, digital::v2::InputPin}; +use embedded_hal::{blocking::spi::Write, digital::v2::InputPin, digital::v2::OutputPin}; use fixed::types::I16F16; use fugit::RateExtU32; use lights_core::{App, BodyPattern, DashboardPattern, Event, Instant, FPS, UI}; @@ -209,6 +209,7 @@ fn main() -> ! { let mut app = App::new(Box::new(ui)); let mut led_pin = pins.led.into_push_pull_output(); + led_pin.set_high(); let mut time = Instant::default(); let delay_ms = 1000 / (FPS as u32);