Robert, thank you very much. Works like charm now. 

To get it work with the device tree builder I added the following at the 
bottome of "am335x-boneblack-overlay.dts" 

&tscadc {
status = "okay";
adc {
ti,adc-channels = <0 1 2 3 4 5 6>;
};
};

Now I can get the adc values as you described: 

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

On Monday, April 4, 2016 at 3:38:11 PM UTC+2, RobertCNelson wrote:
>
> On Mon, Apr 4, 2016 at 7:23 AM, lucas <[email protected] <javascript:>> 
> wrote: 
> > I am trying to enable the ADC of the BBB in the device tree. I had to 
> > disable to capemanager because of reasons apparent from this thread: 
> > 
> https://groups.google.com/forum/#!category-topic/beagleboard/pru/IKVmIjvXnIs 
> > 
> > I have a bit of trouble to wrap my head around how the device tree 
> works. My 
> > idea was to extend am335x-boneblack-overlay.dts inside the devicetree 
> > directory and rebuild and install it. I wanted to base this on the 
> following 
> > cape: 
> > 
> https://github.com/beagleboard/devicetree-source/blob/master/arch/arm/boot/dts/cape-bone-iio-00A0.dts
>  
> > 
> > So, I took a wild guess and added 
>
> sudo sh -c "echo 'BB-ADC' > /sys/devices/platform/bone_capemgr/slots" 
>
> Read the adc values under: 
>
> /sys/bus/iio/devices/ 
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to