ESP32 : Comment configurer GPIO12 en sortie
Par défaut, GPIO12 sur l’ESP32 est configuré comme broche MTDI (JTAG).
Pour l’utiliser comme une broche GPIO de sortie classique, vous devez définir explicitement sa fonction en mode GPIO dans votre code :
esp32_gpio12_output_setup.cpp
#include <soc/gpio_periph.h>
#include <soc/io_mux_reg.h>
// Exécuter ceci une fois avant d'utiliser GPIO12 comme sortie
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[GPIO_NUM_12], PIN_FUNC_GPIO);Check out similar posts by category:
ESP8266/ESP32, Embedded, Electronics
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow