Page 1 of 1

pins_arduino.h to esp32 mapping

Posted: Tue Nov 23, 2021 6:39 am
by ColdWarVet607
I have a DevKit1 board with 30 pin header, an ESP-WROOM-32 Module on it. I am very familiar with programming an using TI's boards and IDE, new to ESP32 and Arduino. I can not correlate the pin assignments given in the pins_arduino.h file to the 2x15 headers on the DevKitV1 board, the pinout of the esp-wroom-32 module or the pin assignment of the esp32 IC itself. For instance the .h file lists:
static const uint8_t TX = 1;
static const uint8_t RX = 3;
static const uint8_t SDA = 21;
static const uint8_t SCL = 22;
The .h defined pin numbers do not match to the board header, the wroom module or the esp32 chip, it as well lists the Builtin_led on pin 2 which it is not and its actually driven from pin 24 of the Wroom module. So how the heck does this mapping work. I know it works because I blinked the led using test code that defines it on pin 2 per below.
#define ledPin 2

void setup()
{
pinMode(ledPin, OUTPUT);
So what how does the .h file mapping actually map back to the esp32 chip, is the .h file, is there another layer of translation Im missing.
Thanks Much -Don

Re: pins_arduino.h to esp32 mapping

Posted: Wed Nov 24, 2021 12:25 am
by rodmcm
Perhaps this will assist

Re: pins_arduino.h to esp32 mapping

Posted: Wed Nov 24, 2021 12:28 am
by rodmcm
Also when you select tools>board>ESP32 Arduino> your board type
then the IO configuration is done for you