Pigeon IMU 1.0 not working in code

We have been working with the Pigeon IMU (version 1.0) to see if we could use it as our gyro, and we have been having some difficulties. We tested the gyro, but we keep receiving values of 0 for the angle. There is a green light on the IMU, and we were able to see it in Phoenix Tuner. At one point, we had the include <PigeonIMU.h> statement, but it was causing errors so we removed it. Our GitHub repository is linked below, so any help would be greatly appreciated.

Can you snapshot test it in Phoenix and see an angle other than 0. If so it is your code, if not it is the pigeon.

Take a look at your code and compare how often and when you’re reading the Pigeon vs how often your outputting the print statement of the gyro angle.

Your current code does not output they gyro angle. I do see a lot of code commented out that would output the double gyroAngle. If that is what you are seeing the problem is the variable gyroAngle is never updated in the code.

Yes, we realized this last night. We ended up switching gyroAngle to gyro.GetAngle() so we could get an updated readout from the gyro. Thank you all!

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