ATONBERGE — ESP32 simulation

An interactive ESP32 circuit simulation you can run free in your browser on Velxio, by swethanpinjala8.

Components

Sketch code

#include <Wire.h>

void setup() {
  Serial.begin(115200);

  Wire.begin(21, 22);

  Serial.println("I2C Scanner Started");
}

void loop() {

  int devices = 0;

  for (byte address = 1; address < 127; address++) {

    Wire.beginTransmission(address);

    byte error = Wire.endTransmission();

    if (error == 0) {
      Serial.print("I2C Device Found: 0x");
      Serial.println(address, HEX);
      devices++;
    }
  }

  if (devices == 0) {
    Serial.println("No I2C devices found");
  }

  delay(3000);
}

More projects by swethanpinjala8