Skip to content
Discussion options

You must be logged in to vote

Just to clarify this point, which was also resolved in the linked discussion point:

ESP32 family hardware peripherals can usually assign their pins at runtime, so although there are default pin numbers in MicroPython the recommended approach is to pick whatever pins are convenient in the physical world and pass the pin numbers to the constructor.

There are some special cases where a pin number is fixed (for example ADC channels, built-in USB, low power peripherals - this last one is not currently supported in MicroPython.) Also some pins on some chips are input-only, so they can only be assigned input functions.

There are some boards where, for example, there is an onboard I2C bus with so…

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@konomikitten
Comment options

Comment options

mattytrentini
Oct 25, 2026
Collaborator Sponsor

You must be logged in to vote
1 reply
@konomikitten
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@projectgus
Comment options

@konomikitten
Comment options

Answer selected by projectgus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
ESP32
Labels
None yet
5 participants