Skip to content

Change pin names for generic feather case using RX and TX #100

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

Merged
merged 1 commit into from
Apr 24, 2025

Conversation

Neradoc
Copy link
Contributor

@Neradoc Neradoc commented Jan 23, 2025

Change pin names for generic feather case using RX and TX instead of D0 and D1 names.
This should make it work with any feather (for those pins).
Tested on the Adafruit ESP32S2 Feather.

Example:

from adafruit_matrixportal.matrix import Matrix
matrix = Matrix()

Would cause:

Traceback (most recent call last):
  File "code.py", line 2, in <module>
  File "adafruit_matrixportal/matrix.py", line 144, in __init__
AttributeError: 'module' object has no attribute 'D1'

…eliable D names

restores functionality for Feather ESP32S2
@FoamyGuy
Copy link
Contributor

@Neradoc do you know if the original D0 and D1 were chosen to support any other specific feather? Is it worth using hasattr to check for TX/RX existence and then try to fallback to D0, D1 if they don't exist?

@Neradoc
Copy link
Contributor Author

Neradoc commented Apr 24, 2025

I don't know, all feathers should have RX and TX. If not, the board definition needs to be fixed.
I ran a script to test the presence of RX in the pins.c of boards in the list of feather compatible boards and they all have it.

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, yeah everything seems to be TX/RX, maybe that was leftover copy paste or started out as a different form factor pins. Looks good to me

Thank you!

@FoamyGuy FoamyGuy merged commit 82588f5 into adafruit:main Apr 24, 2025
1 check passed
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Apr 25, 2025
Updating https://github.com/adafruit/Adafruit_CircuitPython_LED_Animation to 2.12.0 from 2.11.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_LED_Animation#125 from jposada202020/PacMan_animation
  > Merge pull request adafruit/Adafruit_CircuitPython_LED_Animation#124 from jposada202020/blink-with-user-color-selected-background

Updating https://github.com/adafruit/Adafruit_CircuitPython_MatrixPortal to 3.2.5 from 3.2.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_MatrixPortal#100 from Neradoc/fix-feather-pins
  > Merge pull request adafruit/Adafruit_CircuitPython_MatrixPortal#99 from Neradoc/fix-matrix-docs

Updating https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT to 8.0.1 from 8.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#249 from Neradoc/fix-missing-exception-argument

Updating https://github.com/adafruit/Adafruit_CircuitPython_Pathlib to 1.0.1 from 1.0.0:
  > use characters we can show with terminalio in example readme code
  > use characters we can show with terminalio in example

Updating https://github.com/adafruit/Adafruit_CircuitPython_ProgressBar to 2.3.17 from 2.3.16:
  > Merge pull request adafruit/Adafruit_CircuitPython_ProgressBar#41 from dglaude/patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_USB_Host_Descriptors to 0.3.0 from 0.2.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_USB_Host_Descriptors#7 from FoamyGuy/find_boot_keyboard

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_Pathlib
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.

2 participants