7 years, 9 months ago.

Using I2C for L3G4200D with KL46Z

I am wanting to use a KL46Z alongside an L3G4200D gyroscope. The gyroscope uses either SPI or I2C communication. I am wanting to use I2C, and was able to find a library for it through MBED that looks like it should work. However, when I try to use the library, I get a problem where it doesn't communicate correctly and the gyroscope does not initialize because the ID cannot be read from it. So, now I am gonna try to take this from a pure learning perspective:

If I want to learn I2C, how do I go about learning I2C to communicate properly between the KL46Z and the L3G4200D? Or better yet, how do I communicate properly between the KL46Z and the L3G4200D using I2C communication?

WOW! I found this code: https://developer.mbed.org/users/shimniok/code/L3G4200D/ That made it really easy to connect properly. I'm gonna dive in and see what the differences are that made this code work.

posted by George Aguirre 05 Jul 2016
Be the first to answer this question.