Next: Arduino Rotary Encoder Functions, Previous: Arduino Functions, Up: Function Reference [Contents][Index]
Free resources of a device object.
dev - object to free
See also: device.
Display device object.
dev - device object to display
See also: device.
Read a specified number of bytes from a i2c or serial device object using optional precision for bytesize.
dev - connected i2c or serial device opened using device
numbytes - number of bytes to read.
precision - Optional precision for the output data read data. Currently known precision values are uint8 (default), int8, uint16, int16
data - data read from the device
See also: arduino, device.
Read a specified number of bytes from a register of an i2cdev object using optional precision for bytesize.
dev - connected i2c device opened using device
reg - registry value number
numbytes - number of bytes to read.
precision - Optional precision for the output data read data. Currently known precision values are uint8 (default), int8, uint16, int16
data - data read from device.
See also: arduino, device.
subref for device
See also: device.
Write data to a I2C or serial device object using optional precision for the data byte used for the data.
dev - connected i2c or serial device opened using device
datain - data to write to device. Datasize should not exceed the constraints of the data type specified for the precision.
precision - Optional precision for the input write data. Currently known precision values are uint8 (default), int8, uint16, int16
See also: arduino, device, read.
Write data to i2c device object at a given registry position using optional precision for the data byte used for the data.
dev - connected i2c device opened using device
reg - registry position to write to.
datain - data to write to device. Datasize should not exceed the constraints of the data type specified for the precision.
precision - Optional precision for the input write data. Currently known precision values are uint8 (default), int8, uint16, int16
See also: arduino, device, read.
Free resources of a i2cdev object.
dev - object to free
See also: i2cdev.
Display i2cdev object.
dev - i2cdev object
See also: i2cdev.
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.
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 number (when arduino board supports multiple I2C buses) with value of 0 or 1.
dev - new created i2cdev object.
The i2cdev object has the following public properties:
The parent (arduino) for this device
pins used by this object
bus used for created object
I2C address set for object
See also: arduino.
Read a specified number of bytes from a i2cdev object using optional precision for bytesize.
dev - connected i2c device opened using i2cdev
numbytes - number of bytes to read.
precision - Optional precision for the output data read data. Currently known precision values are uint8 (default), int8, uint16, int16
data - data read from i2cdevice
See also: arduino, i2cdev.
Read a specified number of bytes from a register of an i2cdev object using optional precision for bytesize.
dev - connected i2c device opened using i2cdev
reg - registry value number
numbytes - number of bytes to read.
precision - Optional precision for the output data read data. Currently known precision values are uint8 (default), int8, uint16, int16
data - data read from device.
See also: arduino, i2cdev.
subref for i2cdev
See also: i2cdev.
Write data to a i2cdev object using optional precision for the data byte used for the data.
dev - connected i2c device opened using i2cdev
datain - data to write to device. Datasize should not exceed the constraints of the data type specified for the precision.
precision - Optional precision for the input write data. Currently known precision values are uint8 (default), int8, uint16, int16
See also: arduino, i2cdev, read.
Write data to i2cdev object at a given registry position using optional precision for the data byte used for the data.
dev - connected i2c device opened using i2cdev
reg - registry position to write to.
datain - data to write to device. Datasize should not exceed the constraints of the data type specified for the precision.
precision - Optional precision for the input write data. Currently known precision values are uint8 (default), int8, uint16, int16
See also: arduino, i2cdev, read.
Scan arduino for devices on the I2C bus.
ar - arduino object connected to a arduino board.
bus - bus number to scan I2C devices, when multiple buses are available. If the bus is not specified, it will default to 0.
retval - cell array of addresses as strings in format of "0xXX".
# create arduino connection.
ar = arduino();
# scan for devices on the I2C bus
scanI2Cbus (ar)
# output is each detected i2c address as a string
ans =
{
[1,1] = 0x50
}
See also: arduino, i2cdev, checkI2CAddress.
Next: Arduino Rotary Encoder Functions, Previous: Arduino Functions, Up: Function Reference [Contents][Index]