0

On Arch Linux, would it be possible to somehow read the raw positioning data from 4 of these mice at at least 2400dpi simultaneously at high speed (150mm/s) using an RPi? I am guessing that this should be possible but I am struggling to find reading material on the topic, I will obviously need a USB hub though and I do not know how that affects the speed of the mouse operation. I am using Mone C# for coding and I should be able to figure out the code once I have information on how to achieve this in whatever language on the RPi but if you want to post code that would also help...

PS. This is for a project that I will also need a RPi with a Wifi dongle and a webcam and I need to know how much the hub affects the speed (and therefore usability) of the mice so that I know if I will be able to get away with just one RPi. (4mice one port, wifi and webcam on the other or something like that)

2
  • Idk the answer, but out of curiosity: what is this for? Sounds like something clever in the works. Never thought of using mice for measurement of motion
    – Alexander
    Jan 22, 2014 at 6:18
  • This id for a 3D printer...
    – Gerharddc
    Jan 22, 2014 at 13:40

2 Answers 2

1

There is only 1 usb root hub on the pi. There is little difference if you put everything on the hub or if you use 2 hubs or whatever, except for power usage: some wifi dongle can operate directly, some require a powered hub. The Pi ports can only provide 350mA IIRC, which is about half the USB standard maximum. I can't tell you for the mice, but the wifi dongle will be chewing the bandwith already, especially if you are sending the pictures.

And you should buy a Raspberry cam, as it is plugged by another mean. (DSI?)

2
  • Ok thanks, but the official cam is a bit expensive compared to cheap USB webcams.
    – Gerharddc
    Jan 22, 2014 at 13:35
  • You definitely want a powered hub for this. If you get an unregulated one (apparently, most of the inexpensive ones are), it can serve as the power supply for the pi too.
    – goldilocks
    Jan 22, 2014 at 17:25
0

I need to know how much the hub affects the speed (and therefore usability) of the mice so that I know if I will be able to get away with just one RPi...

I don't see why the hub should affect the speed at all. It's unlikely to slow down the speed of light, etc, and input from a mouse would be very slow in relation to the core components of the system anyway.

As to how to get mouse positioning, this probably depends on the context (e.g., within X, without X) and what language you want to work in. The lowest level in userland would be via nodes in /dev/input, there is some documentation for this in [kernel src]/Documentation/input/input.txt which mentions the use of either a simulated PS/2 protocol interface or "evdev".

2
  • As I said, ultimately I want to use C# but that means I can use a wrapper for a C++ library, I want to use the mice for positioning a machine so I need to somehow get all the raw relative data from the mice except if Linux somehow allows tracking over an incredibly large space pixel wise... (150+mm at 3200dpi)
    – Gerharddc
    Jan 23, 2014 at 3:20
  • I'd assume if you are reading raw data directly from the mice they just report relative events, i.e., the "space" they are in is infinite. If you plug in multiple mice under X they'll all affect the cursor, hopefully you can consume events below this. Vis. C++, you can dig around, but the kernel API looks to involve either language agnostic reads on device nodes or else use of the C library ioctl() call.
    – goldilocks
    Jan 23, 2014 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.