I connected my New, new New QT Py RP2040 to my new, new SHT 40 board with my new Stemma Connector only to find that Stemma is using I2C1 on QT Py. (Rats!!)
So I jumpered the SHT 40 to the I2C pins and it works great!!
So, how do I actually address the Stemma Connector when the imported board/module only has I2C (no board.I2C1) ??
i2c = board.I2C() # uses board.SCL and board.SDA
#i2c = board.I2C(board.SCL1, board.SDA1) # Display SCL & SDA ??
Thanks
James
QT PY I2C1
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- danhalbert
- Posts: 4687
- Joined: Tue Aug 08, 2017 12:37 pm
Re: QT PY I2C1
Use this:
We will soon be adding a `board.STEMMA_I2C()` for convenience, but the above works fine.
Code: Select all
import busio, board
i2c = busio.I2C(board.SCL1, board.SDA1)
- Jamesmaclean
- Posts: 7
- Joined: Fri Oct 30, 2020 10:51 pm
Re: QT PY I2C1
Super !
Thanks for helping!!
Thanks for helping!!
- Jamesmaclean
- Posts: 7
- Joined: Fri Oct 30, 2020 10:51 pm
Re: QT PY I2C1
Super !
Thanks for helping!!
Also in CircuitPython why are the Pi Pico's RP2040 boards Pins labeled GP1, GP2 etc.
while the QT Py board's pins named have Labels like A0 A1 & SCL, SDA, D1, D2 ?
Seems like a 2nd learning curve rather than Board to Board consistency ?
Thanks for helping!!
Also in CircuitPython why are the Pi Pico's RP2040 boards Pins labeled GP1, GP2 etc.
while the QT Py board's pins named have Labels like A0 A1 & SCL, SDA, D1, D2 ?
Seems like a 2nd learning curve rather than Board to Board consistency ?
- danhalbert
- Posts: 4687
- Joined: Tue Aug 08, 2017 12:37 pm
Re: QT PY I2C1
The CircuitPython pin names follow the printing on the boards. On Pi Pico, we go by the silkscreen on the bottom (we wish it were on top).
The Qt Py pins are consistent across all QT Py's, RP2040, SAMD21, ESP32-S2, etc. This allows running the same programs on multiple boards. So the consistency is across board types, not across chips. (There are some exceptions for ESP32-S2 boards, for complicated reasons).
The Qt Py pins are consistent across all QT Py's, RP2040, SAMD21, ESP32-S2, etc. This allows running the same programs on multiple boards. So the consistency is across board types, not across chips. (There are some exceptions for ESP32-S2 boards, for complicated reasons).
- Jamesmaclean
- Posts: 7
- Joined: Fri Oct 30, 2020 10:51 pm
Re: QT PY I2C1
Oh, I see.
Thanks for telling me!
Thanks for telling me!
Please be positive and constructive with your questions and comments.