So I am building an Arduino A/G Mouse using an Arduino Pro Micro and MPU6050. Everything works well but when I disconnect and reconnect the controller suddenly the mouse stops working. I have a button in my setup which works fine but I don't get any mouse movement.
I think it has something to do with the MPU6050 because during tests for raw output when I cycled the power it stopped working. Both tests used the wire library.
It functions normally when you first connect everything together.
Then you disconnect the device which is plugged into the USB socket, then reconnect it, then it fails.
Is that it ?
How then do you get it to all to restart again and function normally ?
Removing the device connected to the USB socket on the Arduino Micro causes both the Micro and the MPU6050 to lose power, i.e. the USB socket is the only power connection for both the micro and the MOU6050.