How to read datas from 2 different I2C sensors connected to the 2 I2C output of the Wio Terminal?

#include <Wire.h>

void setup(){ 
  Serial.begin(9600);
  Wire.begin();
  for (int i = 0; i < 127; i++){  
    Wire.beginTransmission(i);
    int error = Wire.endTransmission();
    if (error == 0){
      Serial.println();   
      Serial.print("Device is found at : 0x");   
      Serial.println(i,HEX);  
    }
  }
}


void loop(){
  
}

You can use this code to query the available IIC address of the device

1 Like