Hi,

I made another attempt to read some analog values with the 3.14 RCN kernel.

How am I supposed to read analog values?

The only thing which gives something (strange) seems to be a hacked version 
of the generic_buffer test of the iio framwork. Does anyone know what I am 
doing wrong and/or how else to read A/D values? I am thinking about wiring 
via i2c an a/d converter and use this instead of those on board.

root@beaglebone:~# cat /proc/version 
Linux version 3.14.0-custom-student4+ (student4@bh4) (gcc version 4.8.2 
(GCC) ) #1 SMP Tue Sep 30 20:09:53 EEST 2014

+ lsmod
Module                  Size  Used by
nfc                    56331  0 
bluetooth             232921  2 
6lowpan_iphc            6182  1 bluetooth
omap_aes               11951  0 
omap_sham              17071  0 
ti_am335x_adc           4743  0 
kfifo_buf               2517  1 ti_am335x_adc
industrialio           46758  2 ti_am335x_adc,kfifo_buf
ti_am335x_tsc           4715  0 
rtc_omap                5240  0 
uio_pdrv_genirq         3258  0 
uio                     8858  1 uio_pdrv_genirq
gpio_keys               8038  0 
+ modprobe iio-trig-sysfs
+ echo 1 > /sys/bus/iio/devices/iio_sysfs_trigger/add_trigger
we should have a trigger0 folder now
+ ls /sys/bus/iio/devices/
iio:device0  iio_sysfs_trigger  trigger0
+ cat /sys/bus/iio/devices/trigger0/name
sysfstrig1

+ cat /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage4_en
0
+ cat /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage5_en
0
+ cat /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage6_en
0
+ echo 1 > /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage5_en
+ cat /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage4_en
0
+ cat /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage5_en
1
+ cat /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage6_en
0

ADC Value: 246484699
ADC Value: 237047412
ADC Value: 228527626
ADC Value: 218828111
ADC Value: 209587410
...

I would expect 12 bits out of 16 bits.

Regards,

Robert










-- 
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