RAK3172 pin ADC

Hello, I have a doubt when using the ADC pins of the RAK3172 in the arduino.
I would like to use ADC4 but I don’t know how.
ADC1 is WB_A0, ADC2 is WB_A1. I thought that ADC3 would be WB_A2 and ADC4 would be WB_A3 by the bad logic of the error.
How do I reference ADC4?
Another issue is that in the pinout of this module the ADC1 = pin 32 but when I put uint8_t analogPin = 32 I can’t read the value either, it seems that ADC1 = 19 on the arduino.
Sorry if I was a little confused, I appreciate anyone who can help.

Welcome to the forum @dgois100

As you can see in the RAK3172-E schematics There are only two analog inputs connected to the Base Board. ADC4 is not connected to anything.

Keep in mind that ADC1 == WB_A0 is connected to the battery voltage divider on the WisBlock Base Boards and cannot be used without changes on the base boards.

You could use WB_IO4 or WB_IO5 which are connected to ADC3 and ADC5, but on WisBlock Base Boards these pins are used as digital IO, not as analog inputs.

Hi @beegee, thanks for the greeting.
I forgot to mention that I’m only using the RAK3172 module and not the RAK3172-E baseboard so I was following this datasheet (RAK3172 WisDuo LPWAN Module Datasheet | RAKwireless Documentation Center) .

In the pin definitions I found the references to the ADCs like this:
#define _ADC1 WB_A0
#define _ADC2 WB_A1
#define _ADC3 WB_IO4
#define _ADC4 WB_IO7
#define _ADC5 WB_IO5
But when adapting the Arduino_Analog example in the library to WB_IO7 I only get the value 0.
Am I still making a mistake?

My ultimate goal is to power the RAK3172 module with a CR2032 battery and send its voltage to LoRaWAN when a user presses a button (Better create another post to talk about batteries?), so if the ADC4 is a problem I can switch the pin to the ADC1 on my board, but I would like to understand whether or not I can use ADC4 for other purposes.

Did you check if _ADC3 or _ADC5 works?

I will ask our R&D team about this problem.

Yes, none of them works except ADC1 and ADC2.

uint8_t analogPin[] = {WB_A0, WB_A1, WB_IO4, WB_IO7, WB_IO5};

22:30:10.478 → ADC pin 19 value = 301
22:30:10.478 → Voltage value = 1.059237 V
22:30:11.453 → ADC pin 20 value = 253
22:30:11.453 → Voltage value = 0.890323 V
22:30:12.432 → ADC pin 18 value = 0
22:30:12.432 → Voltage value = 0.000000 V
22:30:13.416 → ADC pin 10 value = 0
22:30:13.416 → Voltage value = 0.000000 V
22:30:14.394 → ADC pin 15 value = 0
22:30:14.394 → Voltage value = 0.000000 V