Arduino Function: Wire.write

Description

Writes data from a slave device in response to a request from a master, or queues bytes for transmission from a master to slave device (in-between calls to beginTransmission() and endTransmission()).

Syntax

Wire.write(value) 
Wire.write(string) 
Wire.write(data, length)

Parameters

  • value: a value to send as a single byte
  • string: a string to send as a series of bytes
  • data: an array of data to send as bytes
  • length: the number of bytes to transmit

Returns

byte write() will return the number of bytes written, though reading that number is optional


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc