Search found 1 match

by PhracturedBlue
Sun Feb 27, 2022 3:55 am
Forum: ESP-IDF
Topic: Mapping GPIO pins to ADC channel
Replies: 1
Views: 4227

Re: Mapping GPIO pins to ADC channel

I know this is a very old topic, but I ran into the issue of wanting to convert a given GPIO pin # to the corresponding ADC without having to create a mapping for each of the ESP32 variants. I came up with the following CPP macros to achieve this: #define _ADC_TO_GPIO(x) x ## _GPIO_NUM #define ADC_T...