Check that an address of given address responds on the I2C bus
ar - arduino object connected to a arduino board.
address - I2C address number to check
bus - bus number to check for I2C device, when multiple buses are available. If the bus is not specified, it will default to 0.
retval - boolean value of true if address responds on the I2C bus
# create arduino connection.
ar = arduino();
# scan for devices on the I2C bus
checkI2CAddress (ar)
# output if a device using that address is attached
ans =
1
See also: arduino, scanI2Cbus.
Package: arduino