Arduino Toolkit - @i2cdev/i2cdev


: dev = i2cdev (ar, address)
: dev = i2cdev (ar, address, propname, propvalue)

i2cdev is depreciated and will be removed in a future version. Use device instead.

Create an i2cdev object to communicate to the i2c port on a connected arduino.

Inputs

ar - connected arduino object

address - address to use for device on I2C bus.

propname, propvalue - property name/value pair for values to pass to devices.

Currently known properties:

bus

bus number (when arduino board supports multiple I2C buses) with value of 0 or 1.

Outputs

dev - new created i2cdev object.

Properties

The i2cdev object has the following public properties:

parent

The parent (arduino) for this device

pins

pins used by this object

bus

bus used for created object

address

I2C address set for object

See also: arduino.