I'm using this tutorial with the code basically unchanged. It works fine with Uno, and not at all with Micro (with the same wiring, accounting for interrupt pins). I have messed around with the MPU6050 cpp files to try to find something, but with no luck. I've also tried the I2CScanner with both Uno and Micro, and it works fine with Uno but just hangs with Micro if there's a connection to the accelerometer from any digital pin.
At this point I'm stuck. Is this just a problem with Micro?
Does the Micro work with other programs?
Can you use the same I/O pins with other programs? It's possible for single I/O pins to be damaged. You could check to make sure the I/O pins work by testing them with a LED. I think it's safe to assume an I/O pin will work as an input if it works as an output but you could test the I/O pins by wiring them as button inputs to make sure they work in input mode.
Since this is your first post, I'll also ask to make sure you selected the correct board in the IDE? You're probably aware the Micro uses a different chip than the Uno so the IDE needs to be set appropriately.
Sorry if I'm telling you stuff you already know (which is very likely).
Thanks for the help. I am new to Micro, and I considered that this could be the source of my problem. I don't think so anymore though, because I recreated a number of the starter kit sketches with the Micro (taking care to select the proper board type), and they all worked fine. As far as I can determine, the MPU6050 is the only thing that doesn't work as expected with Micro. I even modified the code for attachInterrupt()
with digitalPinToInterrupt(pin)
to ensure that it wasn't due to different pin mapping with the new board, but that didn't help.
HI,
I have the same issue, my MPU6050 works fine with my uno but when I use the micro the green led on the side of the arduino logo doesn't light up (but the MPU 6050 red light is on), so nothing is send to the serial port.
If I unplugged the INT cable, the green led lights on.
Any idea?
Thanks for your help.
The SPI pins on the Micro are separated from D10 - D13 and at the opposite end of the board.