-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent/incorrect AIN values and Segmentation fault error #1
Comments
Thanks for the very thorough testing! I have not gotten around to doing much testing of the ADC functions yet myself, so I'm not surprised there are a few problems. The segfaults after running the library mean I'm missing something in my ADC cleanup, which shouldn't be too hard to track down. I'm not sure what's going on with the first problem, besides that I've clearly done something wrong! I'll get working on these as soon as possible. |
Absolutely, I've enjoyed playing around with it. Your library has been helpful for someone like me moving from Arduino. Thanks for working on it. |
changed sysfs.py to call the C extension
I encountered two separate issues with PyBBIO, summarized below and documented in detail here: http://stackoverflow.com/questions/10611294/reading-analog-in-on-beaglebone-avoiding-segmentation-fault-error.
PROBLEM 1: Inconsistent/incorrect AIN values
With a sensor plugged-into any analog-in port, all of the values I read with PyBBIO will practically match each other. But if I use another Python library or
os
module to access the values they are different according to what I expect.PROBLEM 2: Segmentation fault error
If I try the following with a photoresistor plugged-in I get a real value.
cat /sys/bus/platform/devices/tsc/ain1
But if I run an PyBBIO code that accesses any of the analog-inputs and then try to run the above
cat
I get aSegmentation fault
error.The text was updated successfully, but these errors were encountered: