I want to read around 6 analog pins, not necessarily simultaneously. I could afford some delay in between them. i am using nrf52832 dev kit with sdk 15. How do i modify the SAADC example to achieve the same because the example only reads 1 channel. i did found this thread https://devzone.nordicsemi.com/f/nordic-q-a/5561/adc-from-various-pins/19481#19481 which looks similar but i was unable to open the GitHub link provided in the thread. Can you please direct me to the relevant examples.
It should be fine to measure 6 ADC channels at once.
Attached is a slightly modified project from the SDK15.0.0\examples\peripheral\saadc example. Only the main.c file is changed. It will measure the 6 pins AIN0 - AIN5, and print the values in the UART log.
Remember that AIN0 is not the same as A0 printed on the PCB. The AINx pins are:
AIN0 = P0.02AIN1 = P0.03AIN2 = P0.04AIN3 = P0.05AIN4 = P0.28AIN5 = P0.29
Hello Edvin, that was a great help. I was wondering what would i have to do to take the readings from the other 2 analog pins? it does not have to be at same time. could be after a delay, but how do i take those readings as well?