Using Mouse as rotation sensors

Oct 25, 2005 5 Replies

Hi, all!



I want to use a mouse to have 3 rotation sensor for a robot. No problem to read X and Y axes and the buttons, but I can't read the "wheel", that I want to use as third sensor (I need 3 rotation sensors...).



I didn't found any description of the protocol of a wheel Mouse (Z-axis).



Can anyone say how can I read this value?



Thanks a lot in advance! Luca Bertoncello ( snipped-for-privacy@lucabert.de)


sensors...).

(Z-axis).

The wheel is actually 3 buttons. One for each direction, plus one for pushing down. It is not like the X-Y encoders.

Anthony Fremont ha scritto:

Ach!

Then I just have to check which "button" is checked?

But it seems not so to work... I get always the first byte as "8"...

What do I do false?

Thanks (and sorry for my english...) Luca Bertoncello ( snipped-for-privacy@lucabert.de)

The wheel-mouse protocol (MS Intellimouse) uses a 4 byte packet. Since this is not compatible with the 3 byte ps/2 format, the mouse powers on in ps/2 compatibility mode. In order to detect the wheel and extra buttons, you have to tell the mouse to switch modes. BTW, I was wrong (partly). The wheel can be reported as a Z axis (like the X and Y movements) or as a set of extra buttons. It's your choice. It's all right here:

formatting link

Anthony Fremont ha scritto:

This is not the solution... The fourth byte is always equal to the first...

I can't understand...

Thanks Luca Bertoncello ( snipped-for-privacy@lucabert.de)

You need to read the web page completely. You must send the proper commands to the mouse.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required