i2con - Enable the i2c system
Purpose
Turn on I2c System and update config.
Syntax i2con
i2coff - Disable the i2c system
Purpose
Turn off I2c System and update config.
Syntax
i2coff
f2c - Find attached i2c devices
Purpose
This will scan the i2c port looking for attached i2c devices. When a new device is found it will be setup.
Syntax
f2c
Examples
> f2c < Finding I2C Devices....
< Setup BME280 temp on next free chan [26] < Setup BME280 RH on next free chan [27] < Setup BME280 Pressure on next free chan [28]
Found 1 devices
Channels & Vars
Each of the devices found will be allocated the channels the require automatically. Their readings will appear in the gt command etc.
g2c - Get register value from an i2c device
Purpose
This will get the value of the specified register from the specified i2c device address.
Syntax
g2c addr reg bytes
Arguments
addr
The i2c devices address from the l2d command. 0 to 128
reg
The register number from 0 to 256
bytes
The number of bytes to expect back from the i2c device. 1 to 256.
Pushers Yes Returns Nothing
Examples
> g2c 118 137 1 < g2c data 0[111] 1[0] final [111]
Get reg no 137, one bytes from i2c address 118.
Notes
This can be used from the command line and in programs.
l2c - List active i2c devices & sensors
Purpose
Lists all of the active i2c devices connected to the JackBord’s i2c port. This will list all of the devices associated with each i2c address.
Syntax l2c
l2d - List active i2c devices only
Purpose
Lists all of the active i2c devices connected to the JackBord’s i2c port. It only lists whole devices, not sub devices.
Syntax l2d
s2c - Send data to i2c device register
Purpose
Send data to the specified register on the specified i2c device. All values are integers.
Syntax
s2c addr reg value
Arguments
addr
The i2c devices address from the l2d command. 0 to 128
reg
The register number from 0 to 256
value
An integer value between 0 and 256. Pushers Yes
Examples
> s2c 118 137 23 ->/result
Notes
This can be used from the command line and in programs.
v2c - Show the status of the i2c system
Purpose
Displays the status of the i2c system including the number of devices connected and the i2c pins.
Syntax
v2c
rsti2c - Reset all i2c devices
Purpose
This will reset all of the i2c devices connected to the JackBord and remove them from the system.
Syntax
rsti2c
Examples
rsti2c