ESP-IDF + 0/1 examples
SourceVu will show references to i2c_master_probe() from the following samples and libraries:
 
Symbols
loading...
Files
loading...
SummarySyntaxArgumentsRelatedReferences

Return value

- ESP_OK: I2C device probe successfully - ESP_ERR_NOT_FOUND: I2C probe failed, doesn't find the device with specific address you gave. - ESP_ERR_TIMEOUT: Operation timeout(larger than xfer_timeout_ms) because the bus is busy or hardware crash.

Notes

The principle of this function is to sent device address with a write command. If the device on your I2C bus, there would be an ACK signal and function returns `ESP_OK`. If the device is not on your I2C bus, there would be a NACK signal and function returns `ESP_ERR_NOT_FOUND`. `ESP_ERR_TIMEOUT` is not an expected failure, which indicated that the i2c probe not works properly, usually caused by pull-up resistors not be connected properly. Suggestion check data on SDA/SCL line to see whether there is ACK/NACK signal is on line when i2c probe function fails. There are lots of I2C devices all over the world, we assume that not all I2C device support the behavior like `device_address+nack/ack`. So, if the on line data is strange and no ack/nack got respond. Please check the device datasheet.

References

from examples