Can we have a C++ example?

We have a project in C++ that currently controls pan and tilt servos directly, for example by writing directly to /sys/class/pwm/pwmchip0/pwm0/period. We would like to modify this project to instead use the 8MP ArduCam PTZ camera.

Can you add a C++ implementation/example that is equivalent to https://github.com/ArduCAM/PTZ-Camera-Controller/blob/master/pyCode/Focuser.py ? All we are really looking for is examples for directly reading/writing to zoom, focus, IR cut, servo X and Servo Y registers using <linux/i2c-dev.h>. We are looking for something similar to this https://raspberry-projects.com/pi/programming-in-c/i2c/using-the-i2c-interface . (We are not worried about the autofocus algorithm.)

An even simpler request is to just provide some CLI examples for controlling and reading zoom, focus, IR cut, servo X and Servo Y registers. For example, something like this:
sudo sh -c “echo -n ??? > /sys/class/i2c-dev/i2c-1/???”

Hello,

We does not have C++ demo now. If you just need a C++ version of i2c driver to drive PTZ, it is very easy. For PTZ lens, which in fact just is a i2c device. You can refer to this document to write the i2c driver https://www.arducam.com/docs/cameras-for-raspberry-pi/ptz-camera/software/