I have a USB mouse which I am using to measure distance travelled by my bot for a project. I followed this blog to get the optical sensor from the mouse from the arduino and interface it with the arduino. In that blog, the USB wire has been removed and the 4 pins (VCC,GND and 2 data) are connected to the arduino

However,I found the code to not be very robust as the mouse doesn't always establish Serial communication with the arduino.

I have a USB host shield for the arduino. Is there any library which will let me get the x and y coordinates of the mouse using the USB protocol?

And if not, then is there a more stable library which will be more robust than the one used in thr blog linked above?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.