I am trying to configure a sensor connected to Rpi over an i2c bus. I am using PiGPIO library with Python to do this. To configure the sensor, I need to write a certain value to some registers and that doesn't seem to be working.
I am doing the following to write value to a register.
pi.bb_i2c_zip(SDA, [4, i2c_address, 2, 7, 1, register_address, 2, 7, 1, value, 3)
Register address could be 0x0A, and value being 0x04.
When I read the register back, it reads the default value that the sensor came with. So I know the writing doesn't work but reading does. For reading, I do the following and it works
pi.bb_i2c_zip(SDA, [4, i2c_address, 2, 7, 1, register_address, 2, 6, 1, 3)
I haven't been able to find any documentation about how to write to registers using PIGPIO library. Does anyone have had any success in doing something like this? Thanks for your help!