Skip to main content

I2C

These commands are available three ways — in the FREE-WILi GUI app, in a serial terminal, and on the device itself. See Connecting it to a computer for how to reach them.

Write

Writes data to a specific I2C Address

How to use it — press w. At the prompt, enter: Hex: Address, Register, Data Byte(s) Separated By Spaces.

What you enteraddress, register, data_bytes.

Read

Reads the number from the address

How to use it — press r. At the prompt, enter: Hex: Address, Hex Register, Dec Data Length to read Separated By Spaces.

Poll

Tests all addresses for I2C Response

How to use it — press p.

I2C Slave Enable

Turns this device into an I2C slave on the breakout bus (SDA 16 / SCL 17) at the given 7-bit address, backed by a 256-byte register file with auto-incrementing pointer semantics.

Usage

e 17
e 0

e 17 enables slave mode at address 0x17; e 0 disables it and returns the bus to master mode using the current I2C settings.

How to use it — press e. At the prompt, enter: Hex: Address (0 disables).

What you enteraddress.

Set I2C Slave Data

Seeds the I2C slave register file: the first byte is the starting register index, the rest are data bytes stored from there.

Usage

l 00 DE AD BE EF

Stores DE AD BE EF at registers 0x00-0x03.

How to use it — press l. At the prompt, enter: Hex: Register, Data Byte(s) Separated By Spaces.

What you enterdata_bytes.

See also: I2C panel — the on-screen panel for this.