[ESK32-360 Review] Potentiometer controls USB camera image brightness
[Copy link]
The routines in the ESK32-360 software package are very complete. I didn't expect that there are also routines for USB cameras. I have never played with USB cameras before, because I have never seen them in the official routines when I played with other chips before.
There is a USB_Video folder under example\USBD in the ESK32-360 firmware library, which is the USB camera routine. Because ESK32-360 does not have a camera module, the routine uses code to generate a monochrome image.
Connect the USB port of the development board to the computer, turn on the camera in the computer and switch to the virtual camera of ESK32-360 to realize the image transmission from ESK32-360 to PC.
In the USBD/USB_Video/ht32_usbd_class.c file, there are three variables IMAGE_Y, MAGE_U, IMAGE_V, which correspond to the brightness and chroma of the image respectively.
Move the driver of the ADC acquisition potentiometer to the USB_Video project, and assign the upper 8 bits of the potentiometer to IMAGE_Y in the main function to use the potentiometer to adjust the brightness of the image collected by the computer camera.
The code in the firmware library is well designed and very easy to modify.
Below is the modified routine
USB_Video.rar
(8.75 MB, downloads: 5)
|