Open
Description
First of all, great work!
If you are interested here is my "plug & play" USB mode:
https://github.com/ciantic/pycamera-mouse
It was relatively easy to make, only gotcha was that using the zero-hid package was not straightforward, if I tried to use the "official" Python package it cratered the framerate from 70 -> 40fps, but I found out I can just write to the HID device like this:
mouse_hid_device = open("/dev/hidg1", "wb")
def set_relative_mouse(x, y):
mouse_hid_device.seek(0)
buttons = 0x0
vertical_wheel_delta = 0
horizontal_wheel_delta = 0
buf = [
buttons,
int(x) & 0xFF,
int(y) & 0xFF,
vertical_wheel_delta & 0xFF,
horizontal_wheel_delta & 0xFF,
]
mouse_hid_device.write(bytes(buf))
mouse_hid_device.flush()
And it was trivial after that. This didn't affect the framerate.
Metadata
Metadata
Assignees
Labels
No labels