← index #6538PR #9653
Off-topic · high · value 2.471
QUERY · ISSUE

machine.Pin doesn't have a pin() method on the ESP32 port

openby mattytrentiniopened 2020-10-10updated 2024-09-14
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

closedby millosolomilloopened 2022-10-17updated 2022-11-15
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.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied