zephyr/samples/drivers/i2c_scanner
Peter Bigot a9d58e8c5c samples: i2c_scanner: provide more complete output
Update the sample to indicate which device it was using, which helps
mitigate the existing problems identifyin Arduino I2C buses.  Also
output a summary of results so cases where no devices are found
provide output after the Starting... line.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-19 15:22:38 -05:00
..
src samples: i2c_scanner: provide more complete output 2019-11-19 15:22:38 -05:00
CMakeLists.txt license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
overlay-nrf52.conf samples: driver: i2c scanner 2018-12-21 10:27:53 +01:00
prj.conf samples: driver: i2c scanner 2018-12-21 10:27:53 +01:00
README.rst samples: driver: i2c scanner 2018-12-21 10:27:53 +01:00
sample.yaml samples: add test identifier 2019-03-29 17:44:11 -04:00

.. _i2c_scanner:

I2C Scanner sample
##################

Overview
********
This sample sends I2C messages without any data (i.e. stop condition
after sending just the address). If there is an ACK for the
address, it prints the address as ``FOUND``.

.. warning:: As  there  is  no  standard I2C detection command, this sample
   uses arbitrary SMBus commands (namely SMBus quick write and SMBus
   receive byte) to probe for devices.  This sample program can confuse
   your I2C bus, cause data loss, and is known to corrupt
   the Atmel AT24RF08 EEPROM found on many IBM Thinkpad laptops.
   See also the `i2cdetect man page
   <http://manpages.ubuntu.com/manpages/bionic/man8/i2cdetect.8.html>`_

Building and Running
********************
.. zephyr-app-commands::
   :zephyr-app: samples/drivers/i2c_scanner
   :board: nrf52840_blip
   :conf: "prj.conf overlay-nrf52.conf"
   :goals: build flash