Jump to content

microbit.i2c.write

From Compy Docs

Writes a byte string to an I2C address. Unsuccessful writes cause a runtime error to be caught using pcall.

Function

Synopsis

microbit.i2c.write(address, data)

Arguments

  • `address` — A number indicating the 8-bit I2C address. It is twice the value of the 7-bit address.
  • `data` — A string containing the bytes to be sent.

Returns

Nothing.

See Also