Xiao rp2040 i2c

I just wanted to say a huge thankyou to you, davekw7x. Even 2.5 years later, running on Philhower’s Rapsberry Pi Pico/RP2040 version 3.7.2 with Arduino IDE 1.8.19, I have never been able to get I2C1 working on the XIAO RP2040 until I found your post. Changing my pins_arduino.h to:

// Wire
#define __WIRE1_DEVICE (i2c1)
#define PIN_WIRE1_SDA  (6u)
#define PIN_WIRE1_SCL  (7u)
#define SDA            PIN_WIRE1_SDA
#define SCL            PIN_WIRE1_SCL
#define I2C_SDA        (SDA)
#define I2C_SCL        (SCL)

// Wire1 not pinned out
#define __WIRE0_DEVICE (i2c0)
#define PIN_WIRE0_SDA  (28u)
#define PIN_WIRE0_SCL  (29u)

made all the difference. I also tried your I2CForForum.ino sketch with a BME280 (knowing the address would be 0x76), and it worked correctly.

Truly, thankyou.