writeI2Cblock method
Writes a byte array to the I2C bus.
Implementation
void writeI2Cblock(List<int> data) {
autoWait();
var error = I2Cexception.empty();
for (var i = 0; i < retry; ++i) {
try {
i2c.writeBytesReg(hatArduinoI2Caddress, hatRegister, data);
_updateLastAction();
return;
} on I2Cexception catch (e) {
error = e;
sleep(Duration(milliseconds: delay));
}
}
throw error;
}