writeByte method

void writeByte(
  1. int address,
  2. int byteValue
)

Writes a byteValue to the I2C device with the address.

Some I2C devices can directly be written without an explicit register.

Implementation

void writeByte(int address, int byteValue) {
  var data = <I2Cmsg>[];
  data.add(I2Cmsg.buffer(address, [], [byteValue]));
  var result = transfer(data);
  result.dispose();
}