QUERY · ISSUE
machine.Pin doesn't have a pin() method on the ESP32 port
enhancementport-esp32
As reported in the Slack channel, the ESP32 port lacks a method to retrieve the pin number.
(It's possible to print the pin object but this is fragile and requires that the number be parsed from the string.)
The nRF and stm32 ports both have a pin() method on a Pin; the same should exist for the ESP32.
CANDIDATE · PULL REQUEST
Adding Pin.toggle() to docs
docs
Pin.toggle() works with the pyboard and the Raspberry Pi Pico (RP2040), so I am adding the method to the documentation.
Apparently it is not working with the ESP32 port #8789, so feel free to move it under this section:
The following methods are not part of the core Pin API and only implemented on certain ports.