Forum

0

esp32_two_i2c

Avatar
lhxyz

1.

#include 

#define I2C_0_Freq 100000 //400000UL
#define SDA_0 11
#define SCL_0 12
#define I2C_1_Freq 100000 //400000UL
#define SDA_1 21
#define SCL_1 22



TwoWire I2C_0 = TwoWire(0);
TwoWire I2C_1 = TwoWire(1);
void setup()
{
Serial.begin(115200);
I2C_0.begin(SDA_0 , SCL_0 , I2C_0_Freq);
I2C_1.begin(SDA_1 , SCL_1 , I2C_1_Freq);
}

Avatar
Discard