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

Add default I2C pins for STM32F411CE #3865

Merged
merged 1 commit into from
Dec 22, 2020
Merged

Add default I2C pins for STM32F411CE #3865

merged 1 commit into from
Dec 22, 2020

Conversation

djix123
Copy link

@djix123 djix123 commented Dec 22, 2020

No description provided.

@ladyada
Copy link
Member

ladyada commented Dec 22, 2020

hmm does the blackpill have markings for i2c? how'd these pins get picked? im for this PR, just wanna make sure we are consistant :)

@hierophect
Copy link
Collaborator

Hi @djix123, thanks for the PR! The Blackpill does not have silkscreen markings for a default I2C channel, and there are actually 8 different equally viable combinations of I2C outputs on the pins it exposes. We don't typically mark pins as default unless they are clearly outlined on the silkscreen as such.

If you selected these pins for compatibility with python sketches written for the Feather F405, please note that:
myi2c = board.I2C()
is functionally identical to:
myi2c = busio.I2C(board.B6, board.B7)
I'd recommend you use the second in your blackpill projects.

Do you have any other reasons for suggesting this change?

@ladyada
Copy link
Member

ladyada commented Dec 22, 2020

could be because we have board.I2C() in many example codes and they have a confusing error that folks may think means I2C is not supported. (i am not a big fan of board.I2C() for this reason even though it is easier to read )

@djix123
Copy link
Author

djix123 commented Dec 22, 2020

Yes, @ladyada - added them because of the many examples that use board.I2C() ... the actual pins chosen - board.B6/board.B7 are the defaults that the STM32 Arduino core chooses for this board.

@ladyada
Copy link
Member

ladyada commented Dec 22, 2020

i guess thats ok then! better than nothing :D

@dhalbert dhalbert merged commit 65b295c into adafruit:main Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants