Have you activated (PinMuxed) the pins correctly? Use the dtb-rebuilder of Robert Nelson if not.
https://github.com/RobertCNelson/dtb-rebuilder/blob/4.1.x/src/arm/am335x-boneblack.dts1.) Add the following lines within the am335x-boneblack.dts file to activate
all ADC pins.
& tscadc {
status = " okay ";
};
& am335x_adc {
ti , adc - channels = <0 1 2 3 4 5 6 7 >;
};
2) Make and Make install command within the dtb-rebuilder folder
After a reboot you can check if the ADC pins are activated properly by the following procedure:
root@arm : cd / sys / bus / iio / devices / iio : device0
root@arm :/ sys / bus / iio / devices / iio : device0 # ls -l
...
-rw -r - -r - - 1 root root 4096 Aug 13 15:45 in_voltage0_raw
-rw -r - -r - - 1 root root 4096 Aug 13 15:45 in_voltage1_raw
-rw -r - -r - - 1 root root 4096 Aug 13 15:45 in_voltage2_raw
-rw -r - -r - - 1 root root 4096 Aug 13 15:45 in_voltage3_raw
-rw -r - -r - - 1 root root 4096 Aug 13 15:45 in_voltage4_raw
-rw -r - -r - - 1 root root 4096 Aug 13 15:45 in_voltage5_raw
-rw -r - -r - - 1 root root 4096 Aug 13 15:45 in_voltage6_raw
-rw -r - -r - - 1 root root 4096 Aug 13 15:45 in_voltage7_raw
...
If you see something like that, the pins are activated correctly. you can measure them with cat in_voltageX_raw...
Regards
Benjamin