How to set GPIO pin drive strength?

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
GrodanBoll
Posts: 1
Joined: Wed Jun 30, 2021 1:00 am

How to set GPIO pin drive strength?

Post by GrodanBoll » Wed Jun 30, 2021 1:17 am

I want to drive some LEDs directly from GPIO pins on my esp32 board. I want to get close to maximum brightness at ~20 mA.
According to the datasheet it should be possible to set a GPIO pin drive strength to high, which gets you 20 or 40 mA depending on the pin power domain.

The micropython machine.Pin class has a "drive()" method for setting drive strenght but it doesn't seem to be implemented for the esp32 port.
Does anyone know of another way of accessing this setting with micropython?

I know I could also turn the leds on by sinking current to GPIO. But for my application this would not be an ideal solution.

Post Reply