USB_HID.recv Function

Hi
Need To receive live location of mouse using USB HID in boot with Mouse mode

i successfully implemented USB HID in OpenMV3 R2.
but in mouse mode when i run function of receiver as print(Mouse.recv(2)) (Ref = class USB_HID – USB Human Interface Device (HID) — MicroPython 1.13 documentation)
I’m Getting in output as b’’ every time with delay of 5 second
can anyone please help me to get live location of mouser using recv function :exclamation: :exclamation:

My Boot File is

import pyb 
pyb.usb_mode('VCP+HID')

And Main File is

import sensor, image, time, pyb
Mouse = pyb.USB_HID()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
clock = time.clock()

while(True):
    clock.tick()
    img = sensor.snapshot()
    print(Mouse.recv(2))

The camera is really not designed to do this at all. But, I’ll ask Ibrahim if it is possibly able to work.

That’s not how you use HID, you send the events to simulate a keyboard or a mouse, for example:

import pyb, time

hid = pyb.USB_HID()

while(True):
    # x, y and scroll
    # move 10 pixels to the right
    hid.send((0, 10, 0, 0))
    time.sleep(500)