-
Notifications
You must be signed in to change notification settings - Fork 7.6k
I2C protocol not working #10114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Resolution: More info needed
More info must be provided in this issue
Comments
Hello @ankushiot,
Thank you. |
Hi! I've got the same issue with the following sketch:
Only on 3.1.x it's not working anymore. I've tested it successfully on previous versions. |
Can you try instead of Wire.setPins(21, 22);
Wire.begin(); |
The following code works for me on 3.1.1 #include "Wire.h"
void setup() {
Serial.begin(115200);
Wire.setPins(6, 7);
Wire.begin();
}
void loop() {
byte error, address;
int nDevices = 0;
delay(5000);
Serial.println("Scanning for I2C devices ...");
for (address = 0x01; address < 0x7f; address++) {
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0) {
Serial.printf("I2C device found at address 0x%02X\n", address);
nDevices++;
} else if (error != 2) {
Serial.printf("Error %d at address 0x%02X\n", error, address);
}
}
if (nDevices == 0) {
Serial.println("No I2C devices found");
}
} |
1 task
Hi @ankushiot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Board
ESP32 C6 WROOM 1
Device Description
Unable to detect I2C sensor connected.
Hardware Configuration
No only BME 680 was connected. SDA Pin 6, SCL Pin 7
Version
other
IDE Name
Arduino IDE
Operating System
Windows 11
Flash frequency
40MHz
PSRAM enabled
yes
Upload speed
115200
Description
Unable to detect I2C sensor even I2C scanned doesn't shows anything.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: