I am having trouble making this gyroscope to work. I can sort of get Z axis readings from it. If I don't move it, the X and Y axises constantly display -1. When I move the gyro, the X and Y would jump a little bit (a few hundred) but as soon as I stop, they go back to -1. Any suggestion is appreciated. Thanks!!

  • 2
    \$\begingroup\$ Please provide what code/library you are working with; (and a quick schematic/sketch of your parts would be helpful too) to arrive at a quick answer. A negative-one value could mean any number of things depending on how the code is written. \$\endgroup\$
    – boardbite
    Commented Aug 22, 2012 at 1:33
  • \$\begingroup\$ Are you sure it's not doing what it's supposed to? It sounds like it's outputting the \$\Delta\theta\$ per interval, which is how gyroscopes work. We need more information. \$\endgroup\$ Commented May 18, 2013 at 9:50

2 Answers 2


I've struggled with I2C sensors and broken library implementations. In my experience the fastest way to debug the problem is capturing a trace and making sure it looks correct.

There are many common ways to screw up with I2C:

  • No pull-ups or too weak pull-ups
  • Confusing 7-bit and 8-bit I2C addresses
  • Broken software implementation omitting the NACK at the end of a read
  • Not using repeated starts when they are required
  • SDA and SCL are swapped

Check out my tutorial of I2C with more debugging tips.

For the ITG3200 I would make sure reading the WHO_AM_I register is successful before trying to read the values. Also see this question which details the weirdness of the Vlogic with that gyro.


Try to read WHO_AM_I register first which would return 0x69 or 0x68 depending on your circuit. After that make sure you make the right configuration which requires writing 9 on DLPF_FS register and 25 on SMPLRT_DIV ( this configurations are default, you might need different divider and remove Low pass filter etc. ). IF all is well and still you get the same result, it would be working properly. Gyroscopes works with the motion change rule. It does not calculate your angle but it calculates the angle change in time. Returning -1 and change on the movement seems fine to me. Also you need to consider that these are the ADC values and ITG-3200 has a inner adc values. You need to hold it still and test the results to get the best outcome.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.