Aiming to provide a more qmk friendly version of https://playground.arduino.cc/Main/I2cScanner/
This very simple
sketchkeymap scans the I2C-bus for devices. If a device is found, it is reported to theArduino serial monitorconsole.
Pick a target that is aligned to the MCU you want to test:
# ChibiOS is currently 'best effort' and might not report accurate results
make handwired/onekey/proton_c:i2c_scanner_fallback:flash
others might work with additional configuration.
Output is viewable through a compatible tool https://docs.qmk.fm/#/newbs_testing_debugging?id=debugging-tools.
You can change the wires, and plug-in I2C devices while the i2c_scanner is running.
The output of the console will look like this:
Listening:
Scanning...
I2C device found at address 0x20
done