#include <Wire.h>
void setup() {
Serial.begin(9600);
while (!Serial);
Serial.println("\nI2C Scanner");
}
void loop() {
for (byte address = 1; address < 127; address++) {
if (!Wire.requestFrom(address, 1)) continue;
Serial.print("Found device at address 0x");
Serial.println(address, HEX);
}
delay(5000); // Delay for better readability, adjust as needed
}