#include <Arduino.h>
#include <Wire.h>
#include <Colors.h>
void setup()
{
  Serial.begin(115200);
  Wire.begin();
}

void loop()
{
   byte error, address;
  int nDevices;

  Serial.println(Red+"Escaneando...");
  Serial.println("**************"+ fontReset);

  nDevices = 0;
  for (address = 1; address < 127; address++)
  {

    Wire.beginTransmission(address);
    error = Wire.endTransmission();

    if (error == 0)
    {
      Serial.print("Encontrado dispositivo I2C dirección: ");
      Serial.print(boldBlue + "0x");
      if (address < 16)
      Serial.print("0");
      Serial.print(address, HEX);
      Serial.println(fontReset);
      nDevices++;
    }
  }
  Serial.println(Red + "**************" +fontReset);
  delay(5000); 
}
