hytech-racing / code-2024

Repository for all of the code for the 2023-2024 car.
GNU General Public License v3.0
3 stars 0 forks source link

Dashboard -- PWM 7 Segment and Brightness Modes #4

Open rsandhuny opened 8 months ago

rsandhuny commented 8 months ago

Pull Request (PR) into Code-2024

Code Description

Changed Dashboard code. Implemented 3 LED brightness modes (brightness levels in header file), cycled through by LED dimmer button. Lowered brightness of seven segment through pseudo PWM. Cycled between on and off at high frequency.

Testing Description

Cycled through dimmer modes using a timer, and examined the effect on backup dashboard. Initially tested on dimmable lights, then tested 7 segment PWMing. There was a limit to how fast 7 segment can be switched on and off, so used mills() instead of micros().

Additional Information

Used mills() function because there's a limit to how fast you can switch 7 segment on and off.

Checklist