I am running Ubuntu 16.04 on a Beaglebone Black, following instruction from the eLinux site. I've got it installed and running from the eMMC.

However, I'm struggling to get the ADC input pins to work. Examples I have seen (eg this one) suggest that running echo cape-bone-iio > /sys/devices/bone_capemgr.*/slots should do the trick - but this does not work for me, that file does not exist.

This used to work on 14.04, but now does not work on 16.04. How can I get the ADC input to work?


The device tree overlay system has changed a little bit with the 4.x kernel. According to this page, the location is now /sys/devices/platform/bone_capemgr/slots. I also found in this bug report that the name for the device tree overlay is not cape-bone-iio, it is now BB-ADC.

So the command to run on a 4.x kernel Ubuntu system is:

sudo sh -c "echo 'BB-ADC' > /sys/devices/platform/bone_capemgr/slots"

You should then be able to read the analogue values with a command like this:

cat "/sys/bus/iio/devices/iio:device0/in_voltage0_raw"

To make this permanent over a reboot, you can modify the uBoot command-line options, in the file /boot/uEnv.txt. Insert a line like this one:


Note that (I think) you can only have one "enable" line in the file, if you have other modules to enable here, put them on one line separated by commas.

Now on reboot the Beaglebone will enable the ADC input.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.