pins_arduino.h to esp32 mapping

ColdWarVet607
Posts: 1
Joined: Fri Mar 19, 2021 4:30 am

pins_arduino.h to esp32 mapping

Postby ColdWarVet607 » Tue Nov 23, 2021 6:39 am

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

rodmcm
Posts: 65
Joined: Sat Sep 02, 2017 3:31 am

Re: pins_arduino.h to esp32 mapping

Postby rodmcm » Wed Nov 24, 2021 12:25 am

Perhaps this will assist
Attachments
ESP32 IO Arrangement.xlsx
(553.13 KiB) Downloaded 585 times

rodmcm
Posts: 65
Joined: Sat Sep 02, 2017 3:31 am

Re: pins_arduino.h to esp32 mapping

Postby rodmcm » Wed Nov 24, 2021 12:28 am

Also when you select tools>board>ESP32 Arduino> your board type
then the IO configuration is done for you

Who is online

Users browsing this forum: Bing [Bot] and 62 guests