Jump to content
I2Cdevlib Forums

Search the Community

Showing results for tags 'multiple sensors'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • I2Cdevlib Web Tools
    • I2C Protocol Analyzer
    • I2C Device Entry Interface
    • I2C Device Library API
  • I2Cdev Platform Discussion
    • Arduino (ATmega)
    • Arduino Due (ARM Cortex M3)
    • MSP430
    • Other Platforms
  • I2C Device Discussion
    • AD7746 capacitance-to-digital converter (Analog Devices)
    • ADS1115 16-bit A/D converter (Texas Instruments)
    • ADXL345 3-axis accelerometer (Analog Devices)
    • AK8975 3-axis magnetometer (AKM Semiconductor)
    • BMA150 3-axis accelerometer (Bosch Sensortec)
    • BMP085 pressure sensor (Bosch Sensortec)
    • DS1307 real-time clock (Maxim)
    • HMC5843 3-axis magnetometer (Honeywell)
    • HMC5883L 3-axis magnetometer (Honeywell)
    • iAQ-2000 indoor air quality sensor (AppliedSensor)
    • IQS156 ProxSense capacitive touch sensor (Azoteq)
    • ITG-3200 3-axis gyroscope (InvenSense)
    • L3G4200D 3-axis accelerometer (STMicroelectronics)
    • MPL3115A2 Xtrinsic Smart Pressure Sensor (Freescale)
    • MPR121 12-bit capacitive touch sensor (Freescale)
    • MPU-6050 6-axis accelerometer/gyroscope (InvenSense)
    • MPU-9150 9-axis accelerometer/gyroscope/magnetometer (InvenSense)
    • PanelPilot multi-screen digital meter (Lascar Electronics)
    • SSD1308 128x64 OLED/PLED driver (Solomon Systech)
    • TCA6424A 24-bit I/O expander (Texas Instruments)

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 1 result

  1. Greetings, My project requires connecting multiple MPU sensors and sending all rotation data to comp using USB. I have the single sensor code working absolutely fine. Now i am hooking up 2 sensors. Idea is : Tie together the SDA, SCL, Vcc, GND and INT lines of both MPUs together. Connect the AD0 pins of MPUs to different Arduino pins. Declare only 1 MPU6050 object (as given by jeff rowberg) with devAddr = 0x69 (I dont want to maintain X no. of object for X no. of sensors. My project going ahead may need 8+ sensors and i don't want to have 8+ MPU objects in my Arduino) Whenever any sensor needs to be Init / Read / Written to, enable that sensor by writing HIGH to AD0 pin, and writing LOW on all other AD0 pins of other sensors. Once the particular sensor has been enabled, i use the normal mpu functions from my MPU6050 object which have been provided by Jeff. Now while initializing, i enable sensor 1, call mpu.initialize, testconn, dmpInit.... etc... , then i enable sensor 2, and do the same. Same method is followed to collect data from all sensors. Problem is, only Sensor 2 gives valid output. Sensor 1 gives corrupt values. I debugged the problem a little bit, it seems only the sensor which i initalize the last (sensor 2 in above case) gives valid values. I first thought that when i init the second sensor using the single mpu object, it overwrites some SW vars in this object that were previously set by first sensor. Then when i try to access the Sensor 1 with this object, these overwritten values cause problems and arduino ends up reading garbage. However i went through the whole MPU library to see if there are any private / public vars that are MPU specific and that Jeff's code might be saving. but i found nothing. It seems almost all the seful function straightaway call I2CDev Read/WriteBit. This implies as long as the correct device's AD0 is HIGH, and MPU's SW object's devAddr = 0x69, everything should work fine. And yet it does not. Can someone help ? Thanks
  • Create New...