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

PINS_BREAKOUT_GARDEN in Pico Explorer micropython examples are confusing #351

Closed
barnabear opened this issue May 8, 2022 · 6 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@barnabear
Copy link

Some of the examples in https://github.com/pimoroni/pimoroni-pico/tree/main/micropython/examples/pico_explorer include the line ...

PINS_BREAKOUT_GARDEN = {"sda": 4, "scl": 5}
PINS_PICO_EXPLORER = {"sda": 20, "scl": 21}

However the breakout garden connectors on the Pico Explorer base use {"sda": 20, "scl": 21}. I had thought they were on a separate I2C bus, but this is not the case.

Please could the PINS_BREAKOUT_GARDEN lines be removed from the examples. This was quite a head scratcher for me to figure out. In fact it's all one I2C bus.

Thanks.

@Gadgetoid
Copy link
Member

That is... somewhat confusing. I had planned to move these into a library somewhere since these lines are copied all over the place 😬 I guess this is another vote to hurry up and do that.

@Gadgetoid Gadgetoid added the enhancement New feature or request label May 9, 2022
@Gadgetoid Gadgetoid self-assigned this May 9, 2022
@ZodiusInfuser
Copy link
Member

I believe PICO_BREAKOUT_GARDEN is meant to be referring to this product, rather than the breakout garden connectors on the Pico Explorer. https://shop.pimoroni.com/products/pico-breakout-garden-base?variant=32369509892179.

Also we use those pins for I2C on other products too.

@barnabear
Copy link
Author

I believe PICO_BREAKOUT_GARDEN is meant to be referring to this product, rather than the breakout garden connectors on the Pico Explorer. https://shop.pimoroni.com/products/pico-breakout-garden-base?variant=32369509892179.

Also we use those pins for I2C on other products too.

That may be the case, but this directory is specifically for the Pico Explorer Base and this additional line is confusing. Confused me for sure.

@ZodiusInfuser
Copy link
Member

Oh, sorry, my mistake. Yes, those should be removed and reference the defines in this file instead: https://github.com/pimoroni/pimoroni-pico/blob/main/micropython/modules_py/pimoroni.py

Gadgetoid added a commit that referenced this issue May 12, 2022
Gadgetoid added a commit that referenced this issue May 16, 2022
@alphanumeric007
Copy link

I've been just doing this in my own files.
i2c = PimoroniI2C(sda=(4), scl=(5))
And leaving out the
PINS_BREAKOUT_GARDEN = {"sda": 4, "scl": 5}
PINS_PICO_EXPLORER = {"sda": 20, "scl": 21}

@helgibbons
Copy link
Contributor

Closing as I think this should now be sorted!

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

No branches or pull requests

5 participants