Open MauiJerry opened 8 years ago
That's awesome @MauiJerry you saved my life 👍
Only in this video i found the right answer for our problems (arduino Leonardo + mpu 6050) videoI2c
Thank you so much! I was searching the internet for literally hours and this was the best solution.
Reference the DIY Hacking article and my new comment on it... http://diyhacking.com/arduino-mpu-6050-imu-sensor-tutorial/#comment-3543
The article does a nice job showing hookup an arduino Uno... but we had a Leonardo (and some others). The Leonardo puts its I2C on pins 2(SDA) and 3(SCL) which precludes using D2 for interrupt. A bit of googling and we found the solutions...
Up at the top, where mpu is defined, we add the lines:
Then down in Setup, we changed the attachInterrupt section to...
and it all works fine on both arduino and other board. Hope the formatting works.