I would like to build a small low latency device that captures video (NIR at a short distance of 2cm-8cm) with a high speed image sensor (400fps, QQQVGA ROI), detects simple objects like spots, and passes on the coordinates via USB (HID) to a computer. Is it possible to program the OpenMV Cam H7 to act like a class compliant USB device (USB gadget)?
It’s possible to program the camera with the UVC firmware, but USB full speed is not fast enough to stream anywhere near 400FPS.
I see you want to use the camera as HID, yes it’s possible and there’s an example in board control → usb_hid.py please read and follow the comments in the script.
Thank you for your fast answer. Yes, USB throughput should not be an issue as I only want to send at most 10*400=4000 numbers per second. Specifically I would like the device to act as a class compliant MIDI device. Would it be possible to achieve this, e.g. by setting the hid keyword parameter (subclass, protocol, max packet length, polling interval, report descriptor) in the pyb.usb_mode function?
You’re kinda on your own here.
It’s technically possible. But, you should get ready to do firmware debugging.