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 ? 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 . (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/???”


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