applepi-2067 / 2023_Robot

Code for 2067's 2023 Robot
Other
6 stars 0 forks source link

Program lights for piece signaling (for human player) #41

Open SuitedMoose opened 1 year ago

SuitedMoose commented 1 year ago

Put lights on robot, program way to change light to signal human player what game pieces to put on the shelf

jcorcoran commented 1 year ago

RGB LEDs were purchased, are in shop.

These can be controlled through a SPIKE Relay. SPIKE relays are controlled very similarly to Double solenoids.

Relay javadoc is here: http://team2168.org/javadoc/wpilib/edu/wpi/first/wpilibj/Relay.html

The spike has two outputs channels. We can wire them up so that one relay output channel lights the strip(s) yellow, and the other relay output channel lights the strip purple.

Relay states:

Make a class for the lights (doesn't need to be a subsystem), and we can turn them on/off from different subsystems/commands/buttons

marvelous-melanie commented 1 year ago

What do the lights tell a driver? What is their purpose?

-- proximity sensor: red -- desire indicator: yellow for cone, purple for cube

Driver can set cone and cube light status. These actions need to be bound to buttons.