GoPiGo.GroveI2cTransfer(GrovePort, Byte, Byte[], Byte) Method

Definition

Conduct an I2C transaction

public byte[] GroveI2cTransfer (Iot.Device.GoPiGo3.Models.GrovePort port, byte addr, byte[] arrayToSend, byte inBytes = 0);
member this.GroveI2cTransfer : Iot.Device.GoPiGo3.Models.GrovePort * byte * byte[] * byte -> byte[]
Public Function GroveI2cTransfer (port As GrovePort, addr As Byte, arrayToSend As Byte(), Optional inBytes As Byte = 0) As Byte()

Parameters

port
GrovePort

The grove port. GROVE_1 or GROVE_2

addr
Byte

The I2C address of the secondary to be addressed.

arrayToSend
Byte[]

An array of bytes to send.

inBytes
Byte

The number of bytes to read.

Returns

Byte[]

Returns a byte array with what has been read from the I2C element

Applies to