L3G4200D 3-Axis Gyro Carrier with Voltage Regulator. help :)

Hi ! ;

I have a L3G4200D gyro sensor and have been trying to get data from it.I use Arduino Due!! First I want to tell about my pin configuration. Because I have tried it in two different pin configuration. One of them is

VIN - 5V
VDD - (if we have apply 5V to Vin ,then the vdd becomes 3.3V output , so I have wired this 3.3 V from vdd to CS and SDO to use this sensor in I2C communication.)
SDA - to arduino’s SDA
SCL - to arduino’s SCL

DRDY and INT1 is empty

the other one is

VIN is empty ; GND to GND
VDD - I have wired arduino’s 3.3V output to sensor’s VDD , CS and SDO to use as I2C communication.
SDA , SCL , DRDY , INT1 remained same.

which one is correct. I use arduino’s internal pull up resistors sometimes I use external 4.7. But not sure if I have plugged the arduino’s internal pull up resistors. Do you know a way to on or off the internal pull up resistors for SDA and SCL?

with this configuration and this code : http://bildr.org/?s=l3g4200d ( at the bottom of the page )

the serial output is :

x : 3 Y : 65501 Z : 2

and then after rotate the sensor in X about 10 degrees the 3 became about 60 later drops to the 3 even the sensor remained 10 degree position.

I am using ADXL345 accelerometer sensor to use them in Quadcopter.
this is not your product but my sensor is this http://bildr.org/2011/03/adxl345-arduino/

Would you please give me an example code to run this properly?


Your second setup should work; however, you should not need to connect anything to either CS or SDO, unless you are using SPI mode or setting the slave address of the device with the SDO pin. As mentioned on the product page, if you are using the gyro with a 3.3V system, you can leave VIN disconnected and bypass the built-in regulator by connecting 3.3V directly to VDD. The communication lines on the carrier have pull-up resistors, so you should not need to implement the internal pull-up resistors in the Arduino or use external ones.

You can find example code on our GitHub page for the L3G4200D Arduino library.

- Jeremy