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

Analog Pins should also be available as Digital Pins (assuming not input-only) #123

Open
tyeth opened this issue Oct 4, 2023 · 5 comments

Comments

@tyeth
Copy link
Contributor

tyeth commented Oct 4, 2023

I've got the MetroS2, and I believe (unchecked) that I should be able to pick the analog pins for my PIR sensor as well as digital pins.

We may need to duplicate the analog definitions in the digital section, or allow analog pin usage as digital pins in another way.

@tyeth
Copy link
Contributor Author

tyeth commented Oct 4, 2023

Also, I wonder if we should allow the Boot0 button as D0 to be used, it's an instantly available user button on esp32 boards. Good for a simple test (outbound), other simple tests require hardware / code or are mostly inbound (Neopixel)

@tyeth
Copy link
Contributor Author

tyeth commented Oct 4, 2023

I had forgotten the pins are labelled A0-5 on the silkscreen but have different digital pin numbers.

@brentru
Copy link
Member

brentru commented Oct 4, 2023

Also, I wonder if we should allow the Boot0 button as D0 to be used, it's an instantly available user button on esp32 boards.

Yeah, we should allow these to be used as D0

@tyeth
Copy link
Contributor Author

tyeth commented Nov 7, 2023

An extra thing on this issue is the feed names are created based on the backing pin names (not display names), and for analog pins that means take the GPIO pin number and prepend with A, but this adds massive confusion as a third pin alias.
e.g. on feather ESP32 v2 the A5 silkscreen labelled pin (displayname A5) uses GPIO4 which has to be named A4 in the backing field. Another board for example has A8 feedname for the same A5 (displayname that the user selects) pin.
I'd like to remedy this so users don't see feed names which they expect to be certain representing pin names but are not.
@lorennorman this will have repercussions, like feeds needing renaming etc, so only safe for a major breaking change release.

Original Slack message:
The feather ESP32 V2 wippersnapper devices have incorrect pins (displaynames are okay) defined for the analog pins. I then tested an S3 tft feather which is using GPIO8 named A8 in the backing schema for the silk-screen labelled A5 pin, then I noticed the feed name was A8 related too, this will confuse users. I wonder about migrating away from the A prefix for internal names for analog pins and instead stick with GPIO / Pin / something closer to the truth, rather than a third naming alias. The solution to fix the pins for the esp32 v2 is simple, I'll use the wrong names for now, but I want to change the analog pin names across the board

@tyeth
Copy link
Contributor Author

tyeth commented Nov 7, 2023

So feed names are not affected, they are device.ws-001 for first component etc the issue is only the displayed value in the wippersnapper interface, so it's not a breaking change on the users end.
image

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

No branches or pull requests

2 participants