PINE64
RPi.GPIO python module for Pine A64/A64+ - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4)
+--- Forum: Pine A64 Hardware, Accessories and POT (https://forum.pine64.org/forumdisplay.php?fid=32)
+---- Forum: Pi2, Euler and Exp GPIO Ports (https://forum.pine64.org/forumdisplay.php?fid=34)
+---- Thread: RPi.GPIO python module for Pine A64/A64+ (/showthread.php?tid=723)

Pages: 1 2 3 4 5 6 7 8 9 10


RE: RPi.GPIO python module for Pine A64/A64+ - martinayotte - 06-10-2016

It is not well documented, but in my case, I've used GPIO.setmode(GPIO.BCM) instead of GPIO.setmode(GPIO.BOARD)


RE: RPi.GPIO python module for Pine A64/A64+ - igna09 - 06-10-2016

Thank you, use GPIO.BCM has worked also for me!!


RE: RPi.GPIO python module for Pine A64/A64+ - martinayotte - 06-10-2016

Good !
I don't know the subtilities around that, since BCM is usually for Broadcom SoC used on real RPi, and I didn't search further when I saw it was working.
I don't even know for what GPIO.BOARD is used for, maybe another kind of board apart from RPi and PineA64.


RE: RPi.GPIO python module for Pine A64/A64+ - MarkHaysHarris777 - 06-15-2016

hi, I'm very active on the Raspberry PI forum, and plan to be active here as well...

... anyway, GPIO.BOARD simply means 'board' numbering from 1 to 40; as they are numbered on the Pine64 board itself... if the 'top' of the board is the ethernet port, with the RPi port on the right, the BOARD pins are numbered from left to right... top to bottom. So, pin(1) is top left, pin(40) is bottom right.

marcus

edit: PS... I got the RPi.GPIO built tonight on my ubuntu version and have tested my LED lab (hardware and software) from my RPi development; no hits, no runs, no errors ! Everything worked fine straight-away without modification one. Nice job !


RE: RPi.GPIO python module for Pine A64/A64+ - tllim - 06-16-2016

(06-15-2016, 10:15 PM)MarkHaysHarris777 Wrote: hi, I'm very active on the Raspberry PI forum, and plan to be active here as well...

... anyway, GPIO.BOARD simply means 'board' numbering from 1 to 40; as they are numbered on the Pine64 board itself... if the 'top' of the board is the ethernet port, with the RPi port on the right, the BOARD pins are numbered from left to right... top to bottom. So, pin(1) is top left, pin(40) is bottom right.

marcus

edit:  PS... I got the RPi.GPIO built tonight on my ubuntu version and have tested my LED lab (hardware and software) from my RPi development; no hits, no runs, no errors !  Everything worked fine straight-away without modification one.  Nice job !

Welcome Smile


RE: RPi.GPIO python module for Pine A64/A64+ - MarkHaysHarris777 - 06-16-2016

thanks !

Smile


RE: RPi.GPIO python module for Pine A64/A64+ - jacobscarter - 06-17-2016

Is anyone running into the issue where "import RPi.GPIO as GPIO" return "No module named RPi_GPIO"?


RE: RPi.GPIO python module for Pine A64/A64+ - MarkHaysHarris777 - 06-17-2016

hi, make sure you're spellilng it right.

If Python can't find a module its either because you spelled it wrong, or you didn't install it correctly. Make sure you follow the instructions for installing (on git-hub) sudo python setup.py install

... and do that from the unzipped directory. What gnu+linux are you using?


RE: RPi.GPIO python module for Pine A64/A64+ - jacobscarter - 06-17-2016

(06-17-2016, 12:57 AM)MarkHaysHarris777 Wrote: hi, make sure you're spellilng it right.

If Python can't find a module its either because you spelled it wrong, or you didn't install it correctly. Make sure you follow the instructions for installing (on git-hub)  sudo python setup.py install

... and do that from the unzipped directory.   What gnu+linux are you using?

I'm running Lenny Raposos Debian Base on Longsleep Kernel. I followed the instructions and it installs correctly. I'll double check that I'm not getting install errors.

Followed the instructions step by step and still get this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "RPi/GPIO/__init__.py", line 23, in <module>
    from RPi._GPIO import *
ImportError: No module named _GPIO

If I install the original RPI.GPIO I can import it but obviously I can't use it because the pin numbers are different.

I have python-dev installed as well.


RE: RPi.GPIO python module for Pine A64/A64+ - MarkHaysHarris777 - 06-18-2016

the module name should be RPi.GPIO, not RPi._GPIO