I2C - Scan I2C devices
Preparation
- AmebaD [ AMB23 / AMB21 / AMB22 / BW16 / BW16 type C / AW-CU488 Thing Plus / AMB25 / AMB26 ] x 1
Example
Introduction
The example will scan the I2C bus for devices that is connected to Ameba. When a device is found, it will be shown on the serial monitor with the address of the device.
Procedure
Connect the I2C device to I2C_SDA and I2C_SCL of the board.
Open the example in “File” -> “Examples” -> “AmebaWire” -> “I2C_Scanner”.
When the I2C bus detect any I2C device, the serial monitor will show the address of the I2C device as shown below:
When there is no I2C device connected to the board, the Arduino IDE serial monitor will show the message below.
Code Reference
You can find detailed information of this example in the documentation of Arduino:
Realtek IoT/Wi-Fi MCU Solutions . All Rights Reserved. Terms of Use