How to use the A/D converter lines in user space

Enable the A/D lines binding

Before using the A/D lines you have to enable them inside the Device Tree file acme-arietta.dtb. Go to the Arietta G25 pinout page, enable the A/D converter lines,
generate the acme-arietta.dtb file, save it inside the first microSD partition and reboot.

If you are on hurry save this compiled images on the first partition of your microSD:

Using A/D converter input lines from user space

Here is a simple hardware setup to quickly test the A/D lines:

It is a simple linear trimmer (1Kohm but any value is ok) with the central cursor wired to J4.34 (AD0) and the other terminals wired to J4.9 (GND) and J4.5 (3V3).

To read the cursor position in a range o 0 to 1023 type:

root@arietta:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage0_raw

A detailed description of the Atmel AT91 ADC driver used on the Kernel 3.xx is available on this page:

Sergio Tanzilli - -