// Copyright (c) FIRST and other WPILib contributors. // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. #pragma once #include #include #include class Robot : public frc::TimedRobot { public: void Rainbow(); void RobotInit() override; void RobotPeriodic() override; private: static constexpr int kLength = 60; // PWM port 9 // Must be a PWM header, not MXP or DIO frc::AddressableLED m_led{9}; std::array m_ledBuffer; // Reuse the buffer // Store what the last hue of the first pixel is int firstPixelHue = 0; };