Everything is a little more complicated. Because I’m building an FPV camera control center. This center connects to the computer via usb where object tracking is performed and back data is sent through this control center to the transmitter via PPM signal. I can also control the functions of the tracking program from this center, i can to start and end the tracking, select the size of the region of interest, the resolution, etc. The program for windows is written with python. Joystik functions are also available i can pan tilt , zoom, and other things. All PWM values is converted to PPM with PWM to PPM converter.
Setpoint is max screen resoliution/2
Input is ROI center data (number of pixels from 0 to max rezoliution for valuex and valuey send from laptop via usb to arduino nano).
Output is pwm value for camera servo on the drone.
sketch_may24a.ino (11.4 KB)