Our programmers are struggling with how to show their gyro values on the LabView Dashboard. To be more clear, this is the gyro and accelerometer pair that we received in the KOP. They took the example gyro code and they aren’t sure if that works either, but the next step to figuring out if it works is getting a value on the dashboard.
After that problem is sorted out, they would like to know how to prevent gyro drift and how to have a button be able to reset the gyro value to zero (when our shooter arm is all the way down).
Thanks for your time and help.
Ps. They would’ve made this post themselves if they didn’t lock themselves out of Chief Delphi by entering in too many wrong passwords.
They should be able to set any data to the gyro dial on the Dashboard by wiring the value to the indicator “Gyro” in the lock diagram. To get the gyro from the robot to the dashboard, send the value over Network Tables in the robot code then access it in the Dashboard and wire it to the Gyro indicator.
Lowering gyro drift is a much harder problem. Some drift can be caused from badly calibrating the gyros (make sure the robot is sitting still for the first few seconds after you start it up). It can also be caused by electronic interference in the wires (keep them away from motors, power wires, and things that make static). Also just getting a higher quality gyro will help.
To reset the gyro with a button, just wire that button to the Gyro reset VI.
To build on what Ari423 said - you have to send the value from your Get Angle vi to a NT Write Number vi and name the NT Write Number. In the dashboard main vi (in your dashboard project), use a NT Read Number vi with the same name and wire it to the gyro double (it’s orange). If you can’t find it, go to the dashboard main front panel, right click on the gyro dial, and click Find Terminal.
From the Tutorials tab of the LabVIEW Getting Started window, you might take a look at:
Tutorial 6: Creating a Custom Dashboard
Tutorial 7: Integrating Examples into Robot Code
Part 2 of this tutorial shows how to send gyro data from the robot to the dashboard followed by how to edit the dashboard to show the gyro data.