8. LED Strip - FHS-Robotics/FRC-VSCode-Team5866 GitHub Wiki
The current setup for the LED strip is to use the arduino to switch the color. The Roborio communicates via 3 digital pins to communicate with the arduino which mode to be in. If we are team blue or red, the color of the lights switch that color. The arduino controls the lights by sending differing analog outputs to the RGB inputs.
Here are some reference links in case you want to read up on pulse width modulation and controlling the leds:
-
http://first.wpi.edu/FRC/roborio/beta/docs/java/edu/wpi/first/wpilibj/PWM.html
- Documentation for the PWM class
-
https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/
- Here's the tutorial for the arduino
-
https://www.chiefdelphi.com/t/tweaking-pwm-output-period-for-dimming-leds/141079
- A forum that is where I learned to use the setRaw() method