Advanced teams don't just make the robot work -- they make its internal state observable to drivers and pit crew so problems surface before they cost a match. WPILib and the vendors provide tools for exactly this.
The Alerts API#
WPILib's Alert class publishes named warnings/errors to dashboards (Elastic, AdvantageScope, Shuffleboard) over NetworkTables instead of burying them in console spam. Construct an Alert(String text, AlertType type) (types: kError, kWarning, kInfo) and toggle it with set(boolean) from periodic():
private final Alert m_lowBattery =
new Alert("Battery below 11.5V -- swap before next match", AlertType.kWarning);
private final Alert m_camDisconnected =
new Alert("Front camera disconnected", AlertType.kError);
private double m_lastHeartbeat = -1;
@Override public void periodic() {
m_lowBattery.set(RobotController.getBatteryVoltage() < 11.5);
// A Limelight increments its 'hb' heartbeat once per frame; if it stops
// changing, the camera is no longer streaming.
double hb = LimelightHelpers.getLimelightNTDouble("", "hb");
m_camDisconnected.set(hb == m_lastHeartbeat);
m_lastHeartbeat = hb;
}
Now the pit crew sees a red banner the instant a camera drops, rather than discovering it on the field. (Detecting a disconnect by checking whether a NetworkTables entry merely exists is unreliable -- the entry persists after the device drops; the heartbeat is the correct signal.)
Check device connectivity#
Motor controllers expose health: getFaults() / getStickyFaults() on REV SPARK devices, and on CTRE devices isConnected() (or BaseStatusSignal.isAllGood()) for CAN presence plus sticky-fault status signals. (CTRE's isAlive() reports the WPILib motor-safety watchdog, not CAN connectivity, so don't use it to detect a disconnected device.) Roll these into Alerts so a missing CAN device is loud, not silent.
Driver feedback via LEDs#
Addressable LEDs (e.g. WS2812B strips driven from a roboRIO PWM port via AddressableLED/AddressableLEDBuffer, or a CTRE CANdle) turn the robot into its own status display: green when the shooter is at speed, blue when a game piece is held, flashing when vision has a lock. Drivers react to color far faster than to a laptop dashboard, and human players read it from across the field.
m_buffer.setLED(i, atSpeed ? Color.kGreen : Color.kRed);
m_leds.setData(m_buffer);
Controller rumble#
Close the loop with the driver physically: controller.setRumble(RumbleType.kBothRumble, 1.0) for a moment when a game piece is acquired so the operator doesn't have to watch a sensor.
Why this is 'advanced'#
These aren't about making the robot move -- they're about operational reliability. Elite teams treat the robot as a system the humans must monitor under stress. Surfacing faults (Alerts), state (LEDs), and confirmation (rumble) shortens the loop between 'something is wrong' and 'a human fixes it,' which directly converts to fewer dropped matches. Build a one-glance status convention, document it for your drivers, and rehearse it.
the part worth keeping
Key takeaways
- Use WPILib's Alert API -- new Alert(text, AlertType) plus set(boolean) -- to publish named warnings/errors to dashboards instead of console spam.
- Roll device faults (REV getFaults(), CTRE status signals) into Alerts; detect a Limelight disconnect via its 'hb' heartbeat, not entry existence.
- Drive addressable LEDs (AddressableLED / CTRE CANdle) as a status display drivers and human players read instantly.
- Add controller rumble for tactile confirmation; observability of robot state directly reduces dropped matches.
Programming, Controls & SensorsAdvanced Techniques and Case Studieslesson 4 of 5
Keep going
Take the quiz+10 XP with an accountMore in Advanced Techniques and Case Studies
where this came from
Sources and corrections
This lesson is AI-assisted: drafted from primary sources, then reviewed and edited by hand. Errors still get through. When one is reported we fix it and write down what changed, in public, in the corrections log.
sources and further reading
- docs.wpilib.orgWPILib: Robot Alerts
- docs.wpilib.orgWPILib: Addressable LEDs
- docs.wpilib.orgWPILib: Elastic Dashboard
clipped to this lesson
Articles that go further on this
The lesson gets you through the topic. These go wider on it, and they read in one sitting.
- 20 min readFRC Driver Dashboards: Shuffleboard vs Elastic vs GlassCompare FRC dashboards — Shuffleboard, Elastic, Glass, and the Driver Station default — plus how to publish NetworkTables data and build a match-day layout./blogread it
- 7 min readFRC LED Lights: Wiring, Power Budgeting, and the WPILib AddressableLED APIHow to wire addressable LEDs off the PDH's switchable channel, budget their current draw, and use WPILib's AddressableLED API to signal robot state./blogread it
- 11 min readHow to Set Up a Limelight on Your FRC Robot (Wiring, Pipelines, AprilTags)Set up a Limelight on your FRC robot: wiring, power, static IP networking, the web UI, building pipelines, AprilTag botpose, and NetworkTables in Java./blogread it
answer sheet
Lesson quiz
All 3 right completes the lesson. Miss one and only that question comes back, anything you already answered correctly stays banked.
0 of 3 answered
01Which type values does WPILib's Alert class (AlertType) provide for classifying robot status?
02How can you reliably detect that a Limelight camera has disconnected?
03What is an effective way to give a driver tactile confirmation that a game piece was acquired?
Answer every question to submit.
All 51 lessons in Programming, Controls & Sensorsopenclose
01 / prerequisites
02 / foundations-tools-and-first-program
03 / robot-program-and-command-based
04 / motors-and-control
05 / autonomous-trajectories-simulation
06 / sensing-fundamentals
07 / encoders
08 / gyros-imus-orientation
09 / closed-loop-control
10 / vision-pose-estimation
11 / worked-examples-mini-projects
- Not read yet:Mini-Project: A Closed-Loop Elevator with Motion Magic
- Not read yet:Mini-Project: A Velocity-Controlled Shooter on REVLib
- Not read yet:Mini-Project: A Teleop Swerve Drive Subsystem
- Not read yet:Mini-Project: An Autonomous Routine with PathPlanner
- Not read yet:Mini-Project: Vision-Aligned Scoring with Limelight
12 / common-mistakes-troubleshooting
13 / advanced-techniques-case-studies
- Not read yet:State-Space Control and Kalman Filtering
- Not read yet:Log Replay Architecture with AdvantageKit
- Not read yet:Advanced Pose Estimation: Multi-Tag Fusion and Standard Deviations
- Not read yet:Robot Coordination, Alerts, and Operator Feedback
- Not read yet:Case Study: Hardening Software Before an Event