ShyEye/Camera_test/chat.ino
2025-03-05 05:39:00 +01:00

23 lines
564 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include <Wire.h>
void setup() {
Serial.begin(115200);
delay(2000); // Wait for the serial monitor to open
Serial.println("I2C Scanner");
Wire.begin(); // Initialize I2C communication
for (byte address = 1; address < 127; address++) {
Wire.beginTransmission(address);
if (Wire.endTransmission() == 0) {
// If the device responds, it means its present on the bus
Serial.print("Device found at address 0x");
Serial.println(address, HEX);
}
}
Serial.println("End of I2C Scanner");
}
void loop() {
// Empty loop
}