I’ll start by stating that my background isn’t in electronics. I’ve been learning a lot as I go, but it’s still absolutely an area that I’m lacking on.
With that being said, I’m working on a project with a 9-axis imu that communicates over i2c. I’m connecting this to an ESP32. I am using the adafruit libraries and wire.h to facilitate everything.
I’m running into an issue where the IMU seems to stop generating new values. I THINK what is happening is the device is crashing, and the libraries are just returning the last values it received, but regardless, something is wrong and I’m hoping to get some help in diagnosing it.
Here are the exact libraries I’m using:
#include <Wire.h> #include <Adafruit_Sensor.h> #include <Adafruit_L3GD20_U.h> #include <Adafruit_LSM303_U.h> #include <Adafruit_9DOF.h>
These allow me to get the accelerometer, magnometer, gyro, and dof data (pitch and roll).
The IMU seems to work fine at first, so it has me fairly stumped. I have it connected to the 3.3v pin on the device and the esp32. I’ve seen a few other posts that recommend pullup resistors. I won’t lie, I don’t even know what those are or do. I’m hoping someone can help me figure out the issue and if it do need a pullup resistor, help me understand why and what kind?
I want to get this figured out because thought I haven’t done it yet, I’m also planning to add an additional i2c device (SSD 1306 OLED) and I don’t expect that to make my issues go away. So far I’ve gotten the oled to work great independantly, and I’d like to be able to say the same for the imu before I try to use them both at the same time.
I’m hoping you guys might be able to help me diagnose this issue and find a way to resolve it!