I have some data on latency testing; see the attached zip.Sparky wrote:The problem is there isn't a good baseline for mouse latency. At least so far all I've seen are mice compared with other mice. Repeatability might also be an issue. There's also the uncertainty added by the USB polling interval. At best you're looking at a couple ms uncertainty in either direction on the relative measurement, without an absolute baseline.ad8e wrote:The easy way I can think of is to slam the mouse button into a keyboard button at high speed. This causes some delay from physical key pressing speed, which is acceptable because humans have delay from pressing keys too. The computer times these events accurately on both Windows and Linux, and on a variety of tested consumer PCs/laptops. Choosing a good mouse button is important.Sparky wrote:The three approaches I think are best all have in common a test platform capable of both GPIO and USBHost.
USB polling interval is a true, accurate 1000Hz. My computer accurately captures my 1000Hz mouse movement. Also see "keyboard latency namenlos 1.png" in the zip; the Dell measures very consistently. Most devices have problems on the order of >8ms, so the USB polling rate becomes unimportant.
The reason I expect the mouse button to work is that bumping devices together gives bounds on the jitter of both devices, assuming no correlation (a somewhat big assumption). If device A has jitter range 5ms and device B has jitter range 7 ms, bumping them together will give 12ms jitter range.
Your arduino is better than a mouse, the mouse just takes less effort.
Mice have been tested extensively, both through bumping and through more rigorous video: https://www.gamersnexus.net/guides/2594 ... s-vs-wired http://archagon.net/blog/2017/05/24/mx- ... surements/ Many other measurements exist, although I can't find them now. Mice usually suck, but some of them don't and are worth using to measure against. The ones near the top of this list are probably better, since jitter adds latency, so less latency loosely implies less jitter. You'd still have to account for the mouse button jitter, but short of electronic measurement or video measurement, bumping objects is the next best method, mainly because it is easy and accessible.
There are some other good sources in the folder, like "keyboard input lag.jpg". The bottom of the image is the Corsair Rapidfire K70, with known <=8ms jitter range.
EDIT: the max upload size got me. I had to remove most stuff from the zip.