Auto Focus camera with Nvidia Xavier

It works! Thank you again.

As you mentioned, the I2C bus 30 to 33 is built by the LeopardImaging driver.

I couldn’t find the chips because the i2cdetect command doesn’t show me anything.

So with your advice, I tried anyway the i2cset command with 0x0c address on i2c-30 bus.

it didn’t work at first time because I didn’t know the register structure for the motor.

here’s the code for the right register setup

value = (val << 4) & 0x3ff0 data1 = (value >> 8) & 0x3f data2 = value & 0xf0 # time.sleep(0.5) print(“focus value: {}”.format(val)) # bus.write_byte_data(0x0c,data1,data2)

Thanks again. you made my life much easier.