Capturing raw mouse data
Hi all,
Just wondering. I want to be able to use the encoders in an old usb ball mouse for some little projects I was going to try out. Maybe even an old optical usb mouse as well. Anyone with any ideas on how I could log the mouse data as it comes? Is there a particular file I could tail, and then convert the output from? This is part of a small robotics project that I wanted to goof around with using a secondhand nix box for the controller. Any good websites or tutorials/how-to's would be greatly appreciated! TIA |
Hi.
Try $ cat /dev/mouse > outfile (you'll have to change the device if it's not a ps2 mouse) Dave |
thanks, ilikejam,
however, now that i can capture the raw mouse data, I am having issues understanding what I am looking at. Any thoughts on where I can translate the data captured from the mouse and make some sense of it? tia |
Erm, frankly, no.
I can only suggest you capture data from doing very simple (left -> right, up -> down, etc) movements and mouse clicks and looking to see what is generated for each. You might want to use Emacs to view the data, as programs like 'more' and 'less' etc aren't designed to handle files which could concievably have control characters (stuff like Ctrl-C) in the data. I'm sure the ps2 signaling specification would be pretty useful, but I can't find it. Dave |
thanks! i'll google around for the ps2 signaling spec and see what i can dig up. I appreciate the input!
|
All times are GMT -5. The time now is 05:37 AM. |