Trying to use i2c in Micropython. Am I reading this datasheet correctly?

I want to use Micropython to program my ESP32. I believe if I want to use my Qwiic enabled PHT sensor in Micropython I will have to use the i2c system.

https://cdn.sparkfun.com/assets/3/9/5/f … sheet2.pdf

Am I correct in reading that i2c SCL pin is 22, and SDA pin is 21?

# i2c_test.py
from machine import SoftI2C, Pin

i2c = SoftI2C(scl=Pin(22), sda=Pin(21), freq=400000)

Also curious, do I understand correctly that I’ll be able to read any discovered i2c devices on the qwiic bus, and then I’ll be able to send commands to their addresses and that in return will give me values from the devices? That’s how i2c works right?

Yes, I believe that should work…those are the correct pin #s https://cdn.sparkfun.com/assets/3/9/5/f … sheet2.pdf

Please note that we generally do not provide coding assistance beyond our examples and whatnot (too many languages/libraries/etc to manage) - usually youtube/google will have resources/examples that cover the basics of coding which you can combine with our examples to create a version that works for you