ADC_IN0 not properly initialized

Hi,
I’ve been attempting to initialize ADC_IN0 using libmraa, and have had no luck. I have not updated to the latest image (the one that uses ‘/boot/uEnv.txt’ for config instead of ‘/boot/hw_initc.conf’), and I don’t know if that’s necessary.

When I compile and run the “aio.c” example script all the output I get is: “Failed to initialize AIO”, and the problem seems to be that the file ‘/sys/bus/iio/devices/iio:device0/in_voltage0_raw’ does not exist. I can’t seem to find any documentation exactly on how that file is supposed to work, and I cannot find the official radxa source code for their libmraa port anywhere either. Any suggestions on either of these two?

As I suspected, the problem was in the old kernel. Updating did fix the issue, but was somewhat annoying since I had to do a complete reinstallation of my entire system. Additionally, the ADB connection broke down when running apt install rockchip-adb on the bionic-stable distro. The issue was that apt-utils was missing, leaving the installation in an unfinished state. I’ve added sudo apt install -y apt-utils to the wiki page for Ubuntu now, in case others run into the same issue.

If anyone knows a way to fix this issue without performing a full formatting and image burn of the new kernel I would be very happy to learn about it.

1 Like