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
machine.Pin: Implement Pin.toggle() for three ports.
port-esp8266port-esp32port-cc3200
Summary
The ESP32, ESP8266 and CC3200 ports did not provide the method Pin.toggle(). This PR adds it.
Testing
Tested with:
- ESP32
- ESP32C3
- ESP32C6
- ESP32S2
- ESP32S3
- ESP8266
- WiPY 1 (CC3200)