Functions | |
void | scanBus (TwoWire &bus) |
Scan a I2C bus for devices. More... | |
void | scanBus (TwoWire &bus, Print &pr) |
Scan a I2C bus for devices. More... | |
void scanBus | ( | TwoWire & | bus | ) |
Scan a I2C
bus for devices.
This function scans all the addresses (from 1 to 127) of the I2C
bus using the return value of the Write.endTransmisstion
.
When it finds a device prints to the default Serial
port a message saying the a device was found on a specifc address.
bus | the I2C bus |
void scanBus | ( | TwoWire & | bus, |
Print & | pr | ||
) |
Scan a I2C
bus for devices.
This function scans all the addresses (from 1 to 127) of the I2C
bus using the return value of the Write.endTransmisstion
.
When it finds a device prints to the default Serial
port a message saying the a device was found on a specifc address.
This function assumes that the Print
argument is associated wit a small display (LCD ou OLED). So when a I2C
device is found a small message is also printed in the display saying that a new device was found.
bus | the I2C bus |
pr | Arduino Print object that suports the print and println methods |