RAK5205 ADC Reading

Hi All.
I seem to be have a problem reading the ADC input on PB12.

I am initialising the ADC as follows:
External_ADC.pin_num = 2;
External_ADC.pull = RUI_GPIO_PIN_NOPULL;

Readings are taken by :
uint16_t wTempReading;
RUI_LOG_PRINTF(“ADC Sample: %d\r\n”,wTempReading);

However, I seem to get readings in the 2200 +/- a few counts range regardless of the voltage applied to pin 26 on J22 (PB12).

Has anyone had any success on reading the ADC from PB12?


After posting I spotting my mistake. It turns out that I was reading the wrong channel. Got to love cut and paste errors…

Hi . Glad you solve it :wink: We will appreciate if you share your project (if possible) with the community :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.