Hi,
Recently got a Netduino Plus 2 and hooked it up to a C3088 camera module.
I2C code for setting up the camera is not working.
Execute always returns 0 bytes transferred.
After reading some of the I2C posts, I upgraded the firmware to 4.2.2. But that didn't help.
Here is the code:
[font="'courier new', courier, monospace;"] private I2CDevice camI2C = new I2CDevice(new I2CDevice.Configuration(0x60, 100));
private int I2C_TIMEOUT = 1000;[/font]
[font="'courier new', courier, monospace;"] public void writeRegister(byte register, byte value)
{
int result = camI2C.Execute
(new I2CDevice.I2CTransaction[]
{
I2CDevice.CreateWriteTransaction(new byte[] {register, value})
},
I2C_TIMEOUT);
Debug.Print("writeRegister: " + register + " = " + value + " --> " + result);
}[/font]
I tried the CreateWriteTransaction variation that uses internalAddress.
But that breaks with a Null Value for fieldInfo.
Any help is appreciated. Thanks.