This project demonstrates how to scan an I2C bus for active I2C slave devices and get their I2C slave address.
The scanner uses by default an I2C Bus Speed of 100Khz but it can be changed to your preferences.
The scanner also supports I2C slave devices that use clock-stretching. But the device may to hold down the SCL clock line for a maximum of 13.1 milliseconds. @url https://www.i2c-bus.org/clock-stretching/
- A decent ESP development board. I suggest to buy a popular development board with good technical documentation and a significant user base. Examples: Adafruit HUZZAH32, Espressif ESP32-DevKitC, Pycom WiPy, Wemos D32.
- The peripherals that are used in the project. @tip The README of each component contains a section "Shop Products". @example A Bosch BME280 meteo sensor breakout board.
- A working installation of the Espressif ESP-IDF V3.2 development framework** (detailed instructions @ http://esp-idf.readthedocs.io/en/latest/get-started/index.html).
mkdir ~/esp
cd ~/esp
git clone -b v3.3 --recursive https://github.com/espressif/esp-idf.git esp-idf-v3.2
- A C language editor or the Eclipse IDE CDT (instructions also @ http://esp-idf.readthedocs.io/en/latest/get-started/index.html).
- Attach an I2C device
- SCLK = GPIO#21 (Huzzah32 #21 bottomleft) (Lolin32lite #13 bottomleft)
- SDA = GPIO#17 (Huzzah32 #17 bottomleft-1)(Lolin32lite #15 bottomleft-1)
- Run
make menuconfig
and modify for example the GPIO PIN# that you want to use. - Run
make flash monitor
to build and upload the example to your board and connect to its serial terminal.
Do you also want to create innovative IoT projects that use the ESP32 chip, or ESP32-based modules, of the popular company Espressif? Well, I did and still do. And I hope you do too.
The objective of this well documented Starter Kit is to accelerate the development of your IoT projects for ESP32 hardware using the ESP-IDF framework from Espressif and get inspired what kind of apps you can build for ESP32 using various hardware modules.