You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issue with Analog Inputs pins when BBB is connected to LCD7 Cape. #69
I'm running "Linux beaglebone 3.8.13 #1 SMP Thu Sep 12 08:10:59 EDT 2013 armv7l GNU/Linux" on Angstrom on a Beaglebone Black (Rev A5C) with LCD Cape7 (Rev A3) and have the following issue with Analog Inputs pins:
I too am having this issue. I found here that it looks like the AIN0 through AIN3. I have tried to get a handle on AIN4 or AIN5 without success using the Adafruit_BBBIO library. http://elinux.org/Beagleboard:BeagleBone_LCD7
hi all,
This problem is caused by LCD cape because it takes AIN0, AIN1, AIN2, AIN3.
However, you can use AIN4,5,6,7.
Instead of taking analog input from /sys/devices/ocp.2/helper.14/AIN_, you can take the value of analog in following path: /sys/bus/iio/devices/iio:device0/in_voltage__raw.
I did and successful display analog value on LCD7 ^^.
Hope to help you guys.
@timkalinowski I'm having the same issue, I'm trying to write a program that will continuously take a reading from one the ADC's that are left over, but I can't seem to find the correct answer on how to get it to work.
@RobertCNelson sir, can you help us out with this? I'm trying to python and the Adafruit library but I'm guessing since our AINs are not in /helper.*/ we can't use it? Can we bypass this?
@Gonz1903 You can fork and modify the adafruit library or write something in python to read /sys/bus/iio/devices/iio:device0/in_voltage_raw as per @NgocNguyen87 suggestion. Although after further research the issue is because the BBB has one ADC chip with the multiple analog inputs, its slow to poll and the touch screen actually interferes with the readings as well so they fluctuate and aren't overly reliable while the touch screen is connected. I ended up ordering a seperate ADC that connects over i2c and will see how that goes instead as I have more confidence in the readings.
@timkalinowski Have you tried and succeeded with idea that you had suggested?
Does the sampling rate in the new arrangement good enough? I know its been long time and no updates yet, but at least can we come to a conclusion that ordering a separate ADC that connects over i2c is the only possible solution?
Activity
mspicer commentedon Mar 18, 2014
I too am having this issue. I found here that it looks like the AIN0 through AIN3. I have tried to get a handle on AIN4 or AIN5 without success using the Adafruit_BBBIO library.
http://elinux.org/Beagleboard:BeagleBone_LCD7
Let me know if you get anywhere.
ZubairLK commentedon Mar 23, 2014
LCD Cape uses AIN0-3 for Touchscreen. You can't use those. And what does your device tree file look like. Are the rest of the channels enabled?
nancynguyen commentedon Jun 5, 2015
hi all,
This problem is caused by LCD cape because it takes AIN0, AIN1, AIN2, AIN3.
However, you can use AIN4,5,6,7.
Instead of taking analog input from /sys/devices/ocp.2/helper.14/AIN_, you can take the value of analog in following path: /sys/bus/iio/devices/iio:device0/in_voltage__raw.
I did and successful display analog value on LCD7 ^^.
Hope to help you guys.
timkalinowski commentedon Jun 15, 2015
@NgocNguyen87 thanks for the work around.
Anyone know if its possible to enable AIN4/5/6/7 via /sys/devices/ocp.2/helper.*/ in the device tree overlay with a LCD cape?
Gonz1903 commentedon Jun 17, 2015
@timkalinowski I'm having the same issue, I'm trying to write a program that will continuously take a reading from one the ADC's that are left over, but I can't seem to find the correct answer on how to get it to work.
Gonz1903 commentedon Jun 17, 2015
@RobertCNelson sir, can you help us out with this? I'm trying to python and the Adafruit library but I'm guessing since our AINs are not in /helper.*/ we can't use it? Can we bypass this?
RobertCNelson commentedon Jun 17, 2015
Well, 4 pins are used by the touchscreen and other 4 are used by iio..
https://github.com/beagleboard/linux/blob/3.8/firmware/capes/BB-BONE-LCD7-01-00A3.dts#L150
So you should see them under:
/sys/bus/iio/devices/iio:deviceX/
Regards,
Gonz1903 commentedon Jun 17, 2015
@RobertCNelson So how can we get continuous readings from the other ADC pins that are left unused while using Adafruit?
timkalinowski commentedon Jun 17, 2015
@Gonz1903 You can fork and modify the adafruit library or write something in python to read /sys/bus/iio/devices/iio:device0/in_voltage_raw as per @NgocNguyen87 suggestion. Although after further research the issue is because the BBB has one ADC chip with the multiple analog inputs, its slow to poll and the touch screen actually interferes with the readings as well so they fluctuate and aren't overly reliable while the touch screen is connected. I ended up ordering a seperate ADC that connects over i2c and will see how that goes instead as I have more confidence in the readings.
saurabhkale93 commentedon Mar 21, 2016
@timkalinowski Have you tried and succeeded with idea that you had suggested?
Does the sampling rate in the new arrangement good enough? I know its been long time and no updates yet, but at least can we come to a conclusion that ordering a separate ADC that connects over i2c is the only possible solution?