RPi.GPIO python module for Pine A64/A64+
#11
It is not well documented, but in my case, I've used GPIO.setmode(GPIO.BCM) instead of GPIO.setmode(GPIO.BOARD)
  Reply
#12
Thank you, use GPIO.BCM has worked also for me!!
  Reply
#13
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.
  Reply
#14
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 !
  Reply
#15
(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
  Reply
#16
thanks !

Smile
  Reply
#17
Is anyone running into the issue where "import RPi.GPIO as GPIO" return "No module named RPi_GPIO"?
  Reply
#18
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?
  Reply
#19
(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.
  Reply
#20
the module name should be RPi.GPIO, not RPi._GPIO
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  fm transmitter with gpio weasel18 2 2,228 09-10-2019, 04:28 AM
Last Post: desai_amogh
  How to use dts or other setup to declare gpio pin Interrupt (e.g. a button)? dkebler 1 1,217 06-12-2019, 10:37 AM
Last Post: dkebler
Lightbulb Sample GPIO codes highlighting RPi.GPIO-PineA64 and the PI bus MarkHaysHarris777 6 4,483 06-07-2019, 12:37 AM
Last Post: tllim
Star GPIO, SPI and I2C C++ Lib databit 7 5,645 02-04-2019, 05:45 AM
Last Post: Jeff R
Information Howto: Controlling Pine64 GPIO via the filesystem (sysfs) on linux pfeerick 4 6,745 01-24-2019, 03:36 AM
Last Post: Fifth
  GPIO and SPI SamR1 20 13,861 03-15-2018, 10:32 AM
Last Post: jomoengineer
Question GPIO shockr 7 7,085 03-11-2018, 01:52 AM
Last Post: jomoengineer
  Read GPIO problem shworker 14 7,593 08-17-2017, 01:21 PM
Last Post: martinayotte
  Cross-wired Uart Ports between two Pine Boards via Cat5 Cable MarkHaysHarris777 10 5,821 11-20-2016, 04:17 AM
Last Post: pfeerick
  GPIO fiq capability joseph 3 2,370 11-10-2016, 06:07 PM
Last Post: joseph

Forum Jump:


Users browsing this thread: 1 Guest(s)