Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7633

General • Re: i2c not working on specific GPIOs

$
0
0
You cannot use the same I2C module (I2C1) as master and slave in the same time.
Also cannot "use i2c1 on GPIO pins (SDA:4, SCL:5) on the Pico".
GPIO2 I2C1
GPIO3 I2C1
GPIO4 I2C0
GPIO5 I2C0
GPIO6 I2C1
GPIO7 I2C1
// For this example, we run both the master and slave from the same board.
// You'll need to wire pin GP4 to GP6 (SDA), and pin GP5 to GP7 (SCL).
static const uint I2C_SLAVE_SDA_PIN = 2;
static const uint I2C_SLAVE_SCL_PIN = 3;
//static const uint I2C_SLAVE_SDA_PIN = 4; // 4
//static const uint I2C_SLAVE_SCL_PIN = 5; // 5
static const uint I2C_MASTER_SDA_PIN = 6;
static const uint I2C_MASTER_SCL_PIN = 7;

Statistics: Posted by gmx — Sun May 04, 2025 11:58 pm



Viewing all articles
Browse latest Browse all 7633

Trending Articles