circuitpython: [espressif / lolin_s2_mini] Inconsistency in defined pins
There is some inconsistency in the Lolin S2 Mini plate.
The chip itself may have freely configured pins as i2c, sleep, uart, and the tile itself has no descriptions, only numbers.
Some of the pins were defined as compatible with the Lolin D1 Mini.
Similarly with S3 Mini, where there are only numbers directly on the tile, but in Pinout there are descriptions: https://www.wemos.cc/en/latest/s3/s3_mini.html
SCL, SDA, SCK, Miso, Mosi, but not RX and TX (SS - I suggest skipping) were defined.
The method of Board.spi ()
, but there is no Board.I2c ()
(not to mention UART …)
I am asking for unification: adding missing pins / methods.
About this issue
- Original URL
- State: open
- Created 8 months ago
- Comments: 35 (2 by maintainers)
@deshipu you stuck to this UART, and the problem is that the SCK, MISO, MOSI lines are defined, but there is no board.i2c().
Problem:
As everyone knows, there are only numbers on the Lolin s2 mini board.
The problem is what you get when you type “Lolin s2 mini pinout” into Google. This is either an official pinout from Wemos, without I2C/SPI, or an “independent” work, not as defined in Circuitpython.
The current situation looks like a job half done:
BTW:
The SCL, SDA, SCK, MISO, MOSI positions are what Wemos “invented”. According to the datasheet they should be here:
Solution(s)
I see two paths:
And what with
board.i2c()
?Yes, it’s about reducing the support burden, and often there’s no good choice. As another example, we didn’t provide
board.I2C()
, etc. on the Pi Pico. This was not so much because there weren’t silkscreen markings, but because there were different “default” I2C pins defined by different language implementations and also different educational material. See #4121. “That’s the great thing about standards: there are so many.”So we avoided the support burden of “sorry, the default pins aren’t what you thought”, but added a new support burden “how come
board.I2C()
doesn’t work?”.I would like to cool this down. I think different people have different definitions of the word “default”.
On Adafruit CircuitPython Espressif boards, we are generally careful not to assign TXD0 and RDX0 to
board.TX
andboard.RX
, because they are special and can send data during boot, etc. We are also careful not to label those pins as just “TX” and “RX” on the silkscreen: we use “TX0” or “TXD0” and “RX0” or “RXD0”.However, we have many third-party boards (see the list below) that have assigned
board.TX
andboard.RX
to GPIO43 and GPIO44, and maybe it’s too late to undo that. We should have asked them not to do that during the review process and to useboard.TX0
orboard.TXD0
, etc.If these third parties label these pins as TX/RX on the silkscreen, that further complicates things. And now with Lolin not being consistent, I’m not sure what to do. We could change the names for
board.TX
andboard.RX
on the Lolin S3 Mini, but removing pins will break existing code.Or, we can just say it’s not that important, but in the future, try to encourage people not to do this, and maybe start adding
TXD0
etc. as aliases on the boards that do this.To be clear here, it sounds like GPIO43 and GPIO44 are not exposed at all on the Lolin
S3S2 Mini, and would not be available except via bodge wiring to the chip pins. In that case, there should not beboard.RX
andboard.TX
pins@deshipu I don’t understand if the pins are not accessible why they would be listed. Maybe you meant something else?
There’s nothing on the silk or in the docs indicating default
RX
andTX
pins. Some D1-form-factor boards have default (silk + docs) RX and TX in the upper right (USB-connector side, connector at the bottom), but not all.