Page 1
Additional features include an embedded temperature sensor and a 2% accurate internal oscillator. This tutorial will help you get started using the ITG-3200 in your next project. We will cover the hardware, discuss the code briefly, then show you how to hook it up to a microcontroller.
Page 2
In the next picture, you can see a small jumper next to the pin labeled ‘CLK.’ The ITG-3200 has a feature that allows you to connect an external clock. Unless you plan to use an external clock, you need to ‘close’ this jumper by connecting the two pads with solder.
Page 3
Second, since we will not be using an external clock source in this setup, make sure the CLKIN jumper on the bottom of the ITG-3200 is closed with a blob of solder. Here’s everything all hooked up. Make sure you add the small jumper from VDD to VIO to ensure they are both connected to 3.3V.
Page 4
This is the itgAddress I C address of the ITG-3200. The I C address for the sensor is also listed in the datasheet. Remember, this address is directly impacted by the configuration of the solder jumper on the top of the PCB.
Page 5
After reading the identification register a couple of values are written to some registers on the ITG-3200 to configure the gyroscope to read data at 100hz and measure rotation rates up to 2000 degrees per second. The itgRead and itgWrite functions will be explained a little later.
Page 6
Page 6 of 9 The Loop section of the code is usually the ‘meat’ of the sketch, in this case the loop is very straightforward. The sketch reads the X, Y, and Z gyroscope values using the readX(), readY() and readZ() functions. After storing these values, they are printed to the serial terminal.
Page 7
Page 7 of 9 //This function will write a value to a register on the itg32 //Parameters: // char address: The I2C address of the sensor. For the ITG32 00 breakout the address is 0x69. // char registerAddress: The address of the register on the se nsor that should be written to.
Page 8
, is used to write a value to a register on the itgWrite() ITG-3200. To use this function three parameters must be provided: the address, the registerAddress, and the data. The address is the I C address of the sensor. As it turns out, more than one sensor can be connected to theI C pins at the same time.
ADC values from the ITG-3200. You may also notice that even if the gyroscope is sitting still (not rotating in any direction) the values aren’t reporting 0. This is because there is an inherent bias in the gyroscope.
Need help?
Do you have a question about the ITG-3200 and is the answer not in the manual?
Questions and answers