I’m using bmp180 barometric pressure sensor and the adafruit RTC . Everything works fine. then I try to use the 9d0f https://www.adafruit.com/products/1714 but all of a sudden as soon as i initiate 9dof sensor and Assign a unique ID to the sensors based on the sample code called “ahrs” , my code won’t even complete the setup loop.
I’ve run into this problem before where I think adding i2c sensors is interfering, but not sure if it’s their addresses interfering or what, or how to assign different addresses to each device if that is indeed what’s the problem
#include "RTClib.h"//real time clock #include <SFE_BMP180.h> //barometer //libraries for 9dof imu https://learn.adafruit.com/adafruit-9-dof-imu-breakout #include <Adafruit_Sensor.h> #include <Adafruit_LSM303_U.h> #include <Adafruit_9DOF.h> //initiate 9dof , Assign a unique ID to the sensors Adafruit_9DOF dof = Adafruit_9DOF(); Adafruit_LSM303_Accel_Unified accel = Adafruit_LSM303_Accel_Unified(30301); Adafruit_LSM303_Mag_Unified mag = Adafruit_LSM303_Mag_Unified(30302);
Is there something I have to do when using multiple I2C sensors with different ID’s to make sure their ID doesn’t interfere? I know I should be able to use multiple i2C sensors but I’ve had the exact same problem when using some i2c OLED screens and trying to integrate them to my system, where as soon as I initialize the OLED objects the code won’t even complete the setup loop, same thing I described here.