Gyroscope troubles

We are trying to use the AM Dual Gyro/Accelerometer to detect the angle of our shooter. We have it mounted perpendicular to our shooter so that it detects the axis of rotation of the shooter rather than the robots. We also only have the rate part of the gyro wired up to the analog breakout(which we recently found out needs to be separately powered).

Initialization (plugged in to the slot labeled 1 on the analog breakout)

Gyro gyro = new Gyro(1);

The problem is is that when we print out the angle of the gyroscope using:


All we see is that very slowly decreases no matter what. It doesn’t respond to any movement and probably more alarmingly does not change its behavior when it isn’t plugged in.

Any ideas?

Your post is a bit ambiguous, but if you mean the altitude angle of the shooter, a potentiometer is a better choice for this.

You’re right, but we can’t really get our hands on one of those in the next few hours.

How about an encoder?

Post photos of how you have the gyro wired up: one photo for each end of the cable. Please use the macro setting on your camera for close-ups.