Arduino Nano R4 not connenecting with Qwicc Power Delivery Board - help!

Hello!

I am using an Arduino Nano R4 board that includes a I2C Qwiic connector. I am attempting to run the Pwr_Delivery_Board_Example1_ReadParameters.ino that I got from the SparkFun github repository for the power delivery board. After downloading the required libraries, I used a Qwicc connector between my Nano R4 and the power delivery board but keep getting the print statement when I upload the program: “Cannot connect to STUSB4500. Is the board connected? Is the device ID correct?”. The board is connected (via the Qwicc cable), but I am not sure what it means by device ID. I have tried changing the if(!usb.begin()) to if(!usb.begin(0x29,Wire1)) (per the suggestion in the comments of the program), but get the same message. Any suggestions on how to further debug this problem? Any help is appreciated. Thank you!!

On the Nano R4 the Qwiic connector is NOT on the default
Wire (D18/D19) bus
– it is on the second I2C port that the board calls Wire1 (pins D24=SCL / D25=SDA), like you mentioned using (but you need to change all of the “wire” to “wire1”)

The SparkFun_STUSB4500 library constructor lets you pass any TwoWire object, but the example you are running still uses the default Wire…therefore the library is sending I2C traffic out of D18/D19 while the STUSB4500 is sitting on D24/D25 – silence on the bus, so begin() fails.

Change the object declaration to use Wire1:

SparkFun_STUSB4500 usb(&Wire1);

and leave the address alone (0x28).
Re-compile → upload → open serial monitor at 115200.
You should immediately see the expected output:

Connecting to STUSB4500…
Connected!
Device ID 0x21

If you still get the “Cannot connect …” message, run the I²C scanner above and tell me what addresses (if any) appear; we’ll dig deeper from there.

Thank you for your reply! It works now!

Using notepad, I edited the SparkFun_STUSB4500.h file in my computer to change line 41 from

uint8_t begin(uint8_t deviceAddress = 0x28, TwoWire &wirePort = Wire);

to

uint8_t begin(uint8_t deviceAddress = 0x28, TwoWire &wirePort = Wire1);

leaving the default device address as 0x28.

Then in the Pwr_Delivery_Board_Example1_ReadParameters.ino setup() function I changed

Wire.begin();

to

Wire1.begin();

After compiling and uploading, I got parameter readings from the power delivery board in the serial monitor! Thank you!