Pin specification by integer\r disappeared #12933
Replies: 2 comments 6 replies
-
Hard to say. It is a side effect of PR12211, which unified across ports how pins data structures of a port are derived from pins.csv. Re-establishing the integer option is either difficult or ugly code, so I decided instead to change the documentation. See the discussion here: #12877 |
Beta Was this translation helpful? Give feedback.
-
Yep exactly what @robert-hh said. This wasn't a deliberate change (as opposed to some of the other changes in that PR that were deliberate decisions to increase compatibility). I had noticed at the time this was different and then forgot to come back and re-think the next steps. Using the index in the pins.csv file was a bit fragile, but the issue here is that it's different behavior to e.g. esp32 and rp2 where the numeric index is a cpu pin, but here it was a board pin. But it's not uncommon for boards based on cpus to still put numeric "names" on their silkscreen. It's a bit confusing now that on, for example, the Teensy 4.0 that the silkscreen says "3" but you need to now use "D3". We can certainly look at re-introducing pin numbering as a more deliberate feature across all ports (perhaps we should allow numeric entries in the board map?). |
Beta Was this translation helpful? Give feedback.
-
I didn't touch my Teensy40 for a while, but after I loaded it today with 1.22.preview.147 programs specifying a Pin by number - like Pin(10) - fail with message "Pin doesn't exists".
It seems required to specify Pin('D10') or a 'board' or 'cpu' name.
Is this change (omitting the possibility of integer specifications) on purpose or is it a bug/glitch?
Beta Was this translation helpful? Give feedback.
All reactions