I searched the Internet for HID mouse embedded programmers and found this forum, so perhaps someone here knows the answer to my question!
- I'd like to get the rotation from a computer mouse - if you connect an optical computer mouse to your computer over USB, normally if you rotate the mouse in place (don't move it just rotate it, keeping it flat) the cursor doesn't move in any predictable way or even stays put...
Here is a data sheet for a mouse sensor:
https://cdn.sparkfun.com/datasheets/Components/General%20IC/ADNS2620.pdf
If your goal is rotation detection, you want a Gyro.
Get a Eval board from Boch, or ST for one of their Gyro/Accelerometers to play with.
We here could better help you if your end goal was clearer to us.
The data sheet you mentioned says "The output format is a two wire serial port. The current X and Y information are available in registers accessed via the serial port."
What is not mentioned is any current rotation.
Can the firmware on this or any other mouse be modified so that if you rotate the mouse in place, it reports this rotation? How would you do this?
In other words: draw a W on a piece of paper and put your mouse on it. Then rotate it so that the mouse sees ∑ and then rotate it some more so the mouse sees M. I want to get this rotational information (0, 90, 180).
I believe the pixels in the grid that hits the sensor array rotate, and it is possible to recover this rotational information through mathematical operations of some kind, though I don't know what. (The data sheet you've linked hides this information: it abstracts it away. It reports only x, and y, meaning it does not report the rotation.)
but is it possible to do so from the sensor you linked, or from another, similar sensor? How would I do this?
I want it reporting 0 when it sees M, turning to 90 when it sees ∑ turning into 180 when it sees the M turn into a W because it's been rotated so what it saw has turned upside down.
I hope my description is pretty clear but if not please let me know and I'll try again!
I do not think gyros are necessary.