How do you enable analog on Beaglebone Black?

Hi, I am new to Beaglebone, and it seems that analog is not enabled. I am using a new Beaglebone Black Rev C with debian linux version 4.4. I tried both the default image and the image on the board, and neither had the analog enabled.

How do you enable analog?

Thanks!

Do you see /sys/bus/iio folder?

If you don’t, then load the kernel module:

modprobe ti_am335x_adc

Regards,
John

http://www.embeddedhobbyist.com/2015/10/beaglebone-black-adc/

My approach was wrong because you need the devicetree, so follow William’s docs.

Regards,
John

My approach was wrong because you need the devicetree, so follow William’s docs.

Regards,

John

Not necessarily wrong. The ADC device tree file would, and will infact load the same device module. The only problem with just loading the kernel module, is the pins will be in whatever the default state is after boot up. Which I’m not certain what state that would be . . .

Agreed.

Regards,
John

Ok, I followed William’s instructions, and the sample code is working, so I think I am good to go.

Thanks for the help!

Gunnar

Yeah, William did a nice job with this document.

Regards,
John