.write Method

Function:

Writes one byte to the currently selected I²C channel (selection is made through i2c.channel).

Syntax:

i2c.write(b as byte)

Returns:

An  "acknowledge" bit (enum i2c_ack_nack):

  • 0 — ACK
  • 1 — NACK

See Also:

---


Part

Description

b

The byte of data to send to the I²C channel.


Details

This method can be invoked only when i2c.enabled = 1 — YES. Calling this method when the channel is disabled will always return 1 — NACK.


The returned value from invoking this method depends on the I²C peripheral to which you are writing.


.write Method

Details