I want to display the PigeonIMU Yaw value to the Shuffleboard as a compass widget. I can easily display the value as text. Has anyone had success displaying the value as a compass? I’ve played around with the Gyro widget, but that does not appear to be compatible with the CTR PigeonIMU. Using Java (but could translate C++). Please send any code examples.
To use the gyro widget you need to implement the sendable interface. Then you just have to call initsendable in a way that is compatable with the gyro widget. Check out the initSendable() section of the WPIlib gyro and you would probably know how to do it
We have had success displaying our swerve drive vectors using the gyro widget, so I am sure this could work.
This is what the WPILib Gyrobase class does. You can write something similar, but change the method reference in the addDoubleProperty() method to something you want to display.
You can also directly pass an anonymous sendable to shuffleboard in one line using lamba expressions, which makes it much more compact. This is what we did:
Thank you! This is exactly what I was looking for.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.