How to Display Gyroscope to Shuffleboard?

How do you display a gyroscope widget to shuffleboard? Raw numbers don’t have the Gyroscope widget as an option under the “Show as…” drop down. I am trying to display a Pigeon IMU to Shuffleboard.

.withWidget(BuiltInWidgets.kGyro)

Assuming the Pigeon self-reports as a gyro (which I haven’t checked):

PigeonIMU imu = new WPI_PigeonIMU(/* port number */);
Shuffleboard.getTab("Your Tab").add("Gyro", imu);

I am getting the error: java.lang.IllegalArgumentException: Cannot add data of type com.ctre.phoenix.sensors.PigeonIMU to Shuffleboard

I don’t think the Pigeon self reports as a gyro. How do you make it do that? The code snipped you showed gave me the following error:
Unhandled exception: java.lang.IllegalArgumentException: Cannot add data of type com.ctre.phoenix.sensors.PigeonIMU to Shuffleboard

Found the solution. Thanks so much for giving me pointers.
WPI_PigeonIMU is a PigeonIMU wrapper class with sendable functionality. When I used: SmartDashboard.sendData(gyro) it worked.
Thanks again, as this really helps our team in debugging issues!!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.