ADC0 setup and in_voltage_raw reading

Running Ubuntu 14.04 + Ubilinux kernel. ADC is enabled in BIOS.
I have 24V connected to a voltage divider (R1=68k, R2=10k) and the output connected to ADC0/GPIO4/PIN7.
Via sysfs, I export gpio4, set direction to in, and connect the output of the voltage divider.
When I read in_voltage_raw (via sysfs /sys/bus/iio...), I get "7" or "8" no matter what, unless I ground it, which I get "0".
in_voltage_scale is 12.890625.
The voltage at the ADC0 pin is around 3.2 so I am expecting (3.2*1000) / 12.89, or 3.2/255, or something, but this thing just reads the same value regardless if its 1.2V, 2.4V at the pin or 3.2V.
How do you correctly setup this ADC0 pin? Do I need to drop the resistor values to 6.8k/1k? I don't know what the desired current rating for this pin is, and I cannot find any setup information to know if I am correctly exporting, writing direction, etc or if there are more steps I need to take to configure ADC0.
Tagged
Categories
- All Categories
- 105 Announcements & News
- 55 Product News - New Product/Product Change Notice/ End-of-life
- 186 Welcome Developers!
- 55 Unboxing & Project Sharing
- 50 Tech Updates
- 693 UP Products
- 11 UP 7000
- 1 UP Squared i12
- 10 UP Xtreme i12
- 11 UP Squared Pro 7000
- 1 UP Element i12 Edge
- 19 UP Squared V2
- 59 UP 4000
- 24 UP Xtreme i11
- 35 UP Squared 6000
- 60 UP Squared Pro
- 143 UP Xtreme
- 837 UP Squared
- 1.4K UP Board
- 89 UP Core Plus
- 222 UP Core
- 3 UP Xtreme Lite
- 44 UP AI Edge
- 216 Starter Kits & Peripheral