- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 99
Labels
topic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project
Description
Board/Environment
Board: Arduino Uno R4 WiFi
Core Version: 1.5.1
IDE: Arduino IDE 2.2.1
OS: Windows
Sketch to reproduce
#include <Wire.h>
void setup() {
  Wire.begin();
  Serial.begin(115200);
  delay(1000);
  Serial.println("\nI2C Scanner with Timing");
}
void loop() {
  byte error;
  unsigned long startTime = millis();
  Serial.println("Scanning...");
  for (byte address = 1; address < 127; address++) {
    Wire.beginTransmission(address);
    error = Wire.endTransmission();
  }
  unsigned long elapsed = millis() - startTime;
  Serial.print("Time taken to scan I2C bus 0: ");
  Serial.print(elapsed);
  Serial.println(" ms");
  delay(5000);
}Observed Behavior
With no I²C devices connected, a single full scan takes ~126,000 ms (≈126 seconds).
Expected scan duration is typically <200 ms on other Arduino cores.
Each Wire.endTransmission() seems to block for ~1 second when no device responds.
Expected Behavior
A complete scan of addresses 1–126 should complete in a few hundred milliseconds, even when no devices are present.
Metadata
Metadata
Assignees
Labels
topic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project