Ov9281 changing the gain

Hi!
I saw it is possible to change the gain of a ov9281 with Arduino UNO on that site (Software Guide - Arducam) where they seems to change a register address. I’m trying to do the same, but in a MIPI code. I’m able to change the exposure, the resolution, etc, but I cannot find any command to change the gain. Anyone have an idea?

Thanks you!! :slight_smile:

import arducam_mipicamera as arducam
import v4l2 #sudo pip install v4l2
import time

if __name__ == "__main__":
    try:
        camera = arducam.mipi_camera()
        camera.init_camera()
        fmt = camera.set_resolution(1920, 1080)
        camera.set_control(v4l2.V4L2_CID_EXPOSURE,300)
    except Exception as e:
        print(e)

Hi, @newbie

Currently, we have deprecated arducam_mipicamera. Take advantage of the libcamera camera stack framework.

We recommend that you use picamera2 instead, which is a python library based on libcamera and officially made by the Raspberry Pi. It supports the control you need.

In addition, if you absolutely need to use arducam_mipicamera, you can use the arducam_write_sensor_reg method to write the register directly