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

GPIO example does not working under Angstrom current version #35

Closed
jayventi opened this issue Sep 18, 2013 · 3 comments
Closed

GPIO example does not working under Angstrom current version #35

jayventi opened this issue Sep 18, 2013 · 3 comments

Comments

@jayventi
Copy link

I cannot get any GPIO lines to toggle nor do I see any changes in slot entries in /sys/devices/bone_capemgr.8/slots or exported PGIO's in /sys/class/gpio/?

I tried
import Adafruit_BBIO.GPIO as GPIO
GPIO.setup("P9_12", GPIO.OUT)
GPIO.output("P9_12", GPIO.HIGH)

However, I can control GPIO 60 P9_12 using a device overlaid I obtained from a tutorial.

If I perform the following I can control GPIO 60 P9_12 Using a device overlaid from github.com/derekmolloy/boneDeviceTree/

and
echo DM-GPIO-Test > /sys/devices/bone_capemgr.8/slots
echo 60 > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio60direction
echo 1 > /sys/class/gpio/gpio60/value

I have noticed on the Web that some documentation references /sys/devices/bone_capemgr.8/slots and some /sys/devices/bone_capemgr.9/slots I'm not sure if this is random or a versioning issue?

I'm running
uname -a
Linux beaglebone 3.8.13 #1 SMP Tue Jun 18 02:11:09 EDT 2013 armv7l GNU/Linux
Linux version 3.8.13 (koen@rrMBP) (gcc version 4.7.3 20130205 (prerelease) (Linaro GCC 4.7-2013.02-01) ) #1 SMP Tue Jun 18 02:11:09 EDT 2013

Question
if I don't run GPIO.cleanup() should I still see slot entries in /sys/devices/bone_capemgr.8/slots and exported PGIO's in /sys/class/gpio/?

@jwcooper
Copy link
Member

Can you try running the test suite included with the library? The README explains how to set that up. It's the best way to test this out.

Yea, if you don't cleanup, you should see the exported GPIO files in the /sys/class/gpio.

The number with bone_capemgr.* is dynamic based on how the overlays are loaded. The library should handle this properly, and doesn't use a hardcoded value to find that directory.

@jayventi
Copy link
Author

Justin,
Hrrrr typical newbie error.

I was writing the commands in a .py program when the program terminated old
setup was ripped down and the GPIO lines went blank. I executed the
commands interactively the library behaved as expected.

From some comments in the forums I realize that others are having the same
problem.

Do I withdraw the bug report with a comment?

I'll post my great discovery on one of the forum posts where I believe
someone else is having the same problem.

Thanks for getting back so quick,
-jay

On Wed, Sep 18, 2013 at 12:54 PM, Justin Cooper notifications@github.comwrote:

Can you try running the test suite included with the library? The README
explains how to set that up. It's the best way to test this out.

Yea, if you don't cleanup, you should see the exported GPIO files in the
/sys/class/gpio.

The number with bone_capemgr.* is dynamic based on how the overlays are
loaded. The library should handle this properly, and doesn't use a
hardcoded value to find that directory.


Reply to this email directly or view it on GitHubhttps://github.com//issues/35#issuecomment-24694131
.

@jwcooper
Copy link
Member

Glad it's working for you.

I can close this. Thanks!

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