Parallax L3G4200D

i have the gyroscope scope sensor, although i had it working in the past i had to trade my laptop and cant find my backed up hardrive to retrieve files.

does anyone know where i can find the library files for this. i've downloaded several codes from different sources but i get nothing on the serial.

i have a Arduino Mega 2560 hoocked up to the GND, 5V, SCL, and SDA pins to the Parallax L3G4200D.

any links to the code or how to make my own library would be greaty apreciated, i love learning and a challenge.

TIA. :open_mouth:

Hi, welcome to the forum.

That is a 3.3V sensor, it is not allowed to have 5V on that chip. It might already be broken.

The Arduino Mega 2560 board has onboard pullup resistors of 10k for SDA and SCL. That means that it is a 5V I2C bus, and you may not connect that to a 3.3V sensor. You need a level shifter for the I2C bus.

Can you post a link to your sensor module ? Some modules have the bare sensors, other modules have a voltage regulator and level shifter.

thank you for your reply i think it might be broken the I2C Scanner doesnt pick it up.

here is the link to the sensor

http://www.parallaxinc.com/product/27911

im not sure if it was the 5.5v this is from the datasheet

Key Specifications
 Power Requirements: 2.7 to 6.5 VDC
 Communication Interface: I2
C (up to 400 kHz) or SPI (10 MHz; 4 & 3 wire)
 Operating temperature: -40 to +185 °F (-40 to +85 °C)
 Dimensions: 0.85 X 0.80 in (2.16 X 2.03 cm)

I am using that same sensor on some custom boards I am developing, along with an upgraded version (depending on which is available/cheaper when I go to buy some) - the L3GD20 (pin-compatible, register-compatible, just a few passive components differ). It's a nice sensor, easy to work with once you play with it some.

The communication with the chip isn't too hard, you request the contents of a register and it sends them back. I'm not using any library with it currently, but I did use the Adafruit Library for a while on breadboard prototypes. The library works with both SPI and I2C, and should work fine with the Parallax version (you will need to change the device ID in the library to reflect that of the L3GD4200D - found in the datasheet). Take a look through that if you want to roll your own.

It appears that there is level-shifting on the Parallax break-out (without a schematic I cannot be certain, but the gryo only needs 4 passive components to operate and there are way more on that board including 2 IC's), so 5V should be OK.

Otherwise, if you are certain you hooked up the sensor correctly for I2C and the I2C scanner didn't find it, your sensor is likely broken.

Cool, that module has indeed everything as madmattd wrote, a voltage regulator and level shifting. You can connect it to a 5V Arduino.
So you connected it right. With the Mega pins 5V, GND, SCL and SDA.
The i2c scanner should be able to detect it, or else something is wrong.

Did you use the SCL and SDA pins ? Or accidently the A4 and A5 (A4 and A5 are I2C on the Arduino Uno, but not on the Arduino Mega).

Yes I used the the proper pins, I had found a website were it showed the uno and the mega wire hook ups and had working pretty good as good is could get it anyways I'm new to arxuino and want to learn more about the "register" part any links to where I can learn that, if tried searching but Dont know the lingo...lol any ways I greatly apreciate your answers. I am convince ed that I broke it maybe ESD played a factor not very careful when it comes to that.

I'll try that library and change the I'd and see if it works..

I'm used to using the VEX robot c programming so arduino is a bit more complex but I'm getting the hang of it

Perhaps you bought a faulty sensor module. The L3G4200D is protected by the level shifter and voltage regulator. I can't believe it is doing nothing.
You could make a photo of the wiring, so we can check it.

When the i2c scanner can't see it, there is no use to try a library. If the i2c scanner can't see it, the sensor is not available on the I2C bus.

Do you have a link to that website ? The one that shows how to connect a Mega with the sensor.

Which registers do you mean ? The ATmega2560 microcontroller has registers, but the L3G4200D has also registers.
Registers are a bunch of bytes in the chip that can be written to for certain commands and/or be read from for status information or to read certain data.
How you use those registers is in the datasheet. You could try to read the datasheet. When you see a datasheet for the first time, perhaps you only understand 1% to 10% of it. That's normal. I still have to read a datasheet sometimes 5 times, and still might not understand it.

Here is how i hooked it up :smiley: , sorry for the bad quality surface pro 3 doesn't have very good camara.