Quantcast
Channel: SparkFun Electronics Comments
Viewing all articles
Browse latest Browse all 44542

Customer #77074 on SEN-11028 - Triple Axis Accelerometer & Gyro Breakout - MPU-6050

$
0
0

For anyone that is struggling to get this sensor to work with an Arduino Leonardo using the libraries provided the example code link, I was able to get it to work by doing the following:

First, the Leonardo I2C interface is detailed here: http://arduino.cc/en/Main/arduinoBoardLeonardo SDA –> Digital Pin 2 SCL –> Digital Pin 3

Second, the Leonardo interrupt setup is detailed here: http://arduino.cc/en/Reference/AttachInterrupt The DMP6_test is setup to use interrupt 0 which is Digital Pin 2 on the Leonardo. I changed the line:

attachInterrupt(0, dmpDataReady, RISING);

to:

attachInterrupt(4, dmpDataReady, RISING);

And connected the interrupt to Digital pin 7.

The DMP6_test and Processing sketch now works like a charm! I hope this helps anyone else that was struggling with the Leonardo setup.


Viewing all articles
Browse latest Browse all 44542

Trending Articles