10 DOF IMU - L3GD20 Library is not working

Our weekly LIVE video chat. Every Wednesday at 8pm ET!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
fatihdag
 
Posts: 1
Joined: Thu Sep 28, 2017 8:15 am

10 DOF IMU - L3GD20 Library is not working

Post by fatihdag »

Dears,

I have 10 DOF IMU with L3GD20 gyroscope. I can't read sensor output with Adafruit_L3GD20_U library ( https://github.com/adafruit/Adafruit_L3GD20_U).
Code stucks in the following part:

Code: Select all

   if(!gyro.begin())
  {
    /* There was a problem detecting the L3GD20 ... check your connections */
    Serial.print("Ooops, no L3GD20 detected ... Check your wiring or I2C ADDR!");
    while(1);
  }

  

When I remove this part, output becomes as below:


Gyroscope Test

------------------------------------
Sensor: L3GD20
Driver Ver: 1
Unique ID: 20
Max Value: 0.00 rad/s
Min Value: 0.00 rad/s
Resolution: 0.00 rad/s
------------------------------------

X: -0.02 Y: -0.02 Z: -0.02 rad/s
X: -0.02 Y: -0.02 Z: -0.02 rad/s
X: -0.02 Y: -0.02 Z: -0.02 rad/s
X: -0.02 Y: -0.02 Z: -0.02 rad/s
X: -0.02 Y: -0.02 Z: -0.02 rad/s
X: -0.02 Y: -0.02 Z: -0.02 rad/s
X: -0.02 Y: -0.02 Z: -0.02 rad/s
X: -0.02 Y: -0.02 Z: -0.02 rad/s
X: -0.02 Y: -0.02 Z: -0.02 rad/s
X: -0.02 Y: -0.02 Z: -0.02 rad/s


Please note that it is working with other codes that i found in the internet.
Waiting your support.

User avatar
jps2000
 
Posts: 811
Joined: Fri Jun 02, 2017 4:12 pm

Re: 10 DOF IMU - L3GD20 Library is not working

Post by jps2000 »

check if sda and scl are properly wired and that there are pullups (4k7) on each line

Locked
Please be positive and constructive with your questions and comments.

Return to “Ask an Engineer! VIDEO CHAT (closed)”