I am using an Arduino UNO and the Ocean Optics (8-photodiode) pixelsensor (model #2042ASY-005). (Pin 2 is D- and pin 3 is D+.) The sensor does not have a library but requires a USB Interrupt Transfer to get the data from the sensor.
According to the sensor documentation, you send an OUT Interrupt transfer packet (4 bytes). When this is received by the sensor device it will cause an IN Report to be queued at the device (and will update the devices configuration register if required). You then send an IN interrupt transfer request. When this is received by the device it causes the device to return the the queued IN Report (20 bytes long) which contains the sensor data.
I have looked at a number of codes and watched many videos on external and internal interrupts, registers, etc., but I am still at a loss how/what command to use to send the OUT and IN interrupt transfer packet/request. I assume could use serial.readBytes to read in the queued IN report once sensor creates it, but could you shed any light on how I would send the OUT interrupt transfer packet and then the IN interrupt transfer request from the Arduino to the sensor?
Thank you very much for any help you can give!