Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stemma i2c pin name aliases, or improvement on naming conventions #9558

Open
migs35323 opened this issue Aug 23, 2024 · 1 comment
Open

Stemma i2c pin name aliases, or improvement on naming conventions #9558

migs35323 opened this issue Aug 23, 2024 · 1 comment
Labels
board New board or update to a single board enhancement
Milestone

Comments

@migs35323
Copy link

I was trying to use the stemma pins on some feather or qt py adafruit boards without using i2c (using other interfaces or simply the underlying gpios)
and i noticed that there is no easy way to identify these pins without consulting code, datasheets or other resources...

while one can use board.STEMMA_i2C to create the i2c interface, i believe there should be a way to use these pins with other interfaces.

example1:

import board
import digitalio
led1 = digitalio.DigitalInOut(board.STEMMA_SDA)
led2 = digitalio.DigitalInOut(board.STEMMA_SCL)

example 2, a class/object named STEMMA to make it more clear:

import board
import digitalio
led1 = digitalio.DigitalInOut(board.STEMMA.SDA)
led2 = digitalio.DigitalInOut(board.STEMMA.SCL)



Currently the naming is something like "SDA", "SDA1" which is OK, but there could be aliases, or a better naming system for these pins so one can easily reference those as stemma pins and not look up which sda interface that pin is connected to

another example that i noticed is in the esp32-c6, the stemma 3 volt line is actually gpio20 (IIRC) which is currently named as neopixel power, however this doesn't make it clear that this "neopixel power" is also the stemma VCC pin.

@dhalbert dhalbert added this to the Long term milestone Aug 25, 2024
@tannewt tannewt added the board New board or update to a single board label Aug 27, 2024
@tannewt
Copy link
Member

tannewt commented Aug 27, 2024

Example 1 makes sense to me. Example 2 is harder because of the nested object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board New board or update to a single board enhancement
Projects
None yet
Development

No branches or pull requests

3 participants