// Go to address zero. transaction = new I2CDevice.I2CTransaction[] { I2CDevice.CreateWriteTransaction(new byte[] {0}) }; result = clock.Execute(transaction, i2c_timeout); // Read data var data = new byte[7]; transaction = new I2CDevice.I2CTransaction[] { I2CDevice.CreateReadTransaction(data) }; result = clock.Execute(transaction, i2c_timeout);
It appears that you should be able to do something like this:
// Read data var data = new byte[7]; transaction = new I2CDevice.I2CTransaction[] { I2CDevice.CreateWriteTransaction(new byte[] {0}), I2CDevice.CreateReadTransaction(data) }; result = clock.Execute(transaction, i2c_timeout);
This would combine the write to the clock to set the address and the read to get the data. This causes the netduino to freeze and requires me to unplug the clock and erase the netduino code. I'm okay with doing this in two steps, I'm just curious if it's "supposed" to work in one combined transaction.
Thanks!
Stacy