Skip to content
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

Closed
omundy opened this issue May 17, 2012 · 3 comments
Closed

Inconsistent/incorrect AIN values and Segmentation fault error #1

omundy opened this issue May 17, 2012 · 3 comments

Comments

@omundy
Copy link

omundy commented May 17, 2012

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 a Segmentation fault error.

@alexanderhiam
Copy link
Member

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.

@omundy
Copy link
Author

omundy commented May 17, 2012

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.

@alexanderhiam
Copy link
Member

Moved PROBLEM 1 to Issue 2 and closed.
Moved PROBLEM 2 to Issue 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants