We recently built a new driver station for our team and it went into use this year. It has a pretty simple analog LED strip that I want to be able to control from the robot code somehow. The general idea would be that instead of it constantly showing the same color, it would be able to mirror the colors that the robot is showing, mostly to look cool.
The two methods I thought of to achieve this would both involve using an Arduino with some transistors to control the LEDs. In the first method the Arduino would communicate with the Driver Station app we currently use, and the LED values would be sent over Network Tables. I’m almost certain this could be done as our dashboard is programmed in JS and JS has the SerialPort API which would allow direct Serial comms with the Arduino.
The second method would be using the Arduino as a USB Human Interface Device and using the setOutput method in the GenericHID class to set the LED colors. This would be more direct, significantly easier to set up, wouldn’t require modifications to existing dashboards (it wouldn’t really need any extra code on the driver station); however, I’ve been looking into it and have not seen any simple examples of using Arduinos for HID Output so it could be a bit of a programming challenge to get it working.
I know about the Launchpad for FRC, but that wouldn’t allow PWM, and I want adjustable brightnesses.
Do any of you have any different ideas or things you have actually done to tackle this problem?