adafruit / Wippersnapper_Boards

Hardware Description Models for Adafruit IO Wippersnapper Beta.
MIT License
6 stars 50 forks source link

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

Open tyeth opened 9 months ago

tyeth commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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

brentru commented 9 months ago

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 commented 7 months ago

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 commented 7 months ago

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