Live updating, bare-bones gyro widget. Supports resetting to zero on click for calibration.
- Copy the contents of
gyro.html
to wherever in the dashboard you desire. - Copy
gyro.js
into thecomponents
directory of your FRCDashboard system. - Link the script from
index.html
, for example:
<script src="components/gyro.js"></script>
- Copy
gyro.css
to thecss
directory in your FRCDashboard system. - Link the CSS from
index.html
, for example:
<link rel="stylesheet" href="css/gyro.css">
- If necessary, change the keys of the NetworkTables values used in
gyro.js
to the keys your robot code uses.
Alternatively, you could just copy all the JavaScipt code into ui.js
or other JavaScript script, but that's a bit tougher to keep organized.