Skip to content

Expand CANdle Subsystem Funtionality #21

@rhit-halseysh

Description

@rhit-halseysh

We bought these nice LED indicators that we can talk with over CAN on the robot. We will use the candles to control LED lights to signal to the drivers and users different things on the robot. For example, telling the human player that we are coming for a cube or cone by turning lights purple or yellow.

https://store.ctr-electronics.com/candle/
https://v5.docs.ctr-electronics.com/en/stable/ch12b_BringUpCANdle.html?highlight=candle

Problem:
We want to be able to control the color of the lights and their brightness from other subsystems. To do this we want a set of Enums that follow our style guidelines to set the color and brightness.

What needs to happen:
Pull the existing branch
Create an Enum of possible light colors and brightnesses we would need
State for Cone, Cube, Scoring, Aligned
Encode what position we are in: Bottom third lit up for low, the bottom and middle third let up for mid, and all of it lit up for human or high. Slow blinking to represent it's in an intermediate, and pink/off when it's stowed.
(hint: we already did something similar to this in another branch)
Create a method that can take in the Enum and brightness level, changing the CANdle accordingly
Test your code on the test board
Use switch to determine what color to show

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions