- Author
- Version
- Date
- Overview
- Requirements
- Installation
- Usage
- Code Description
- Troubleshooting
- Contributing
- Additional Resources
- License
- Larbi OUIYZME
- 1.0
- October 6, 2023
This project includes a simple I2C scanner program that detects I2C devices connected to your ESP board or Arduino. It scans through the range of possible I2C addresses and reports which addresses are in use.
- Software : Arduino IDE
- Arduino, ESP32, ESP8266, or NodeMCU board
- I2C devices for testing (e.g., sensors, displays, etc.)
- Open Arduino IDE.
- Copy the I2C scanner code into a new Arduino sketch.
- Connect your board to the computer.
- Choose the correct board and port in the Arduino IDE.
- Upload the sketch to your board.
- Open the Serial Monitor from the Arduino IDE.
- The program will start scanning for I2C devices automatically.
- If any I2C devices are found, their addresses will be printed in the Serial Monitor.
The code begins the I2C communication and continuously scans for devices, printing the address of any devices it finds.
- Ensure your board is correctly connected to your computer.
- Make sure the Serial Monitor's baud rate matches the one set in the code (115200 by default).
- Check your wiring if the scanner isn't detecting your I2C devices.
If you'd like to contribute to this project, please fork the repository and submit a pull request.
For more details, please refer to the full article : Understanding I2C Protocol, Addressing, and How to Build an I2C Scanner for ESP Boards.
This project is licensed under the MIT License. See the LICENSE.md
file for details.