Jump to content
I2Cdevlib Forums

MPU6050 + LSM303 Aux setup (no DMP)


Recommended Posts

Hello,

 

I've built a quadrotor and have connected an MPU6050 accel/gyro to an Arduino Uno, successfully reading any gyro and accel outputs. I'm trying to keep it as simple as possible, so I'm not concerned with DMP at the moment and am only trying to read raw values, I'll implement my own conversions and filters later.

 

The challenge I've been facing now is to feed a LSM303 tilt compass (https://www.sparkfun.com/products/retired/10703) through the MPU6050 ASDA and ASCL. I'm only trying to read the LSM303 magnetometer readings.

 

The current wiring is as follows:

 

LSM303:   -----------    MPU6050:

SCL    <------------->  ASCL

SDA    <------------->  ASDA

GND    <------------->  GND

with both voltages connected to the Arduino's 3.3v output.

 

The main problems are:

1) How to setup the registries on the MPU6050 for a slave device.

2) How to read the aux ports from the MPU6050 and print them on the arduino serial monitor.

 

I've attached the basic code, you'll notice I'm trying to keep it as simple as possible and for the time being am not using jrowberg's librairies to best understand the process.

 

Any help would be greatly appreciated.

Sensor_9DOF.txt

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...