Get Battery Voltage

Hello. Is there a way to get feedback of battery voltage to our smart dashboard?

In the robot code, you can get the battery voltage with DriverStation.getInstance().getBatteryVoltage() and put that value to the SmartDashboard.

Ok thanks!

Wait, why would you want to do that? The battery voltage is always visible on the Driverstation in the top left corner.

We want to do it so that when our battery voltage gets to a certain level it will alert us in the smart dashboard and also signal our red leds that we use as something is wrong.