adafruit / Wippersnapper_Boards

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

New Pin Properties #128

Open lorennorman opened 7 months ago

lorennorman commented 7 months ago

We've been discussing moving away from:

{
  "name": "D0",
  "displayName": "arbitrary string"
}

...and moving to something that closer reflects reality:

{
  "logicalPin": 0,
  "silkscreen": "COPY_FROM_SILKSCREEN_IMAGE"
}

The "D" is synthetic in the first example, just an arbitrary label we've used to denote a digital pin. We'd like to move to using the actual logical pin integer here to reduce surprise, confusion, and parseInt operations!

displayName has been nice for putting arbitrary text into the web app without a developer having to push code, but we've ended up:

Once a board has a magic json file, I believe we could entirely generate nice display names for pins, if we desire.

We'd also like to have a silkscreen property that should be exactly what appears on the silkscreens for a given board. This should reduce confusion for the user and we can always easily double-check that things are correct if there's an issue.

We can evaluate the difficulty of this after we've rolled out magic JSON for all boards