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-18-2016

@markus, the underscore is present in the original source.
https://github.com/swkim01/RPi.GPIO-PineA64/blob/master/RPi/GPIO/__init__.py
The problem that @jacobscarter faced is probably elsewhere.


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

(06-18-2016, 08:02 AM)martinayotte Wrote: @markus, the underscore is present in the original source.
https://github.com/swkim01/RPi.GPIO-PineA64/blob/master/RPi/GPIO/__init__.py
The problem that @jacobscarter faced is probably elsewhere.

Thanks @martinayotte for the clarification. (my bad, doh)


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

I am getting an error when trying to install the GPIO Python module:
unable to execute 'aarch64-linux-gnu-gcc': No such file or directory

I am using the OpenHAB distro from here:
http://wiki.pine64.org/index.php/Pine_A64_openHAB_Release

Can anyone help me out?


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

(06-18-2016, 04:34 PM)respawned Wrote: I am getting an error when trying to install the GPIO Python module:
unable to execute 'aarch64-linux-gnu-gcc': No such file or directory

I am using the OpenHAB distro from here:
http://wiki.pine64.org/index.php/Pine_A64_openHAB_Release

Can anyone help me out?

Hi, you are missing the GCC compiler. I havent used OpenHAB so I dont know what Linux distro it is based on to help you further, but if you want to join us in the Pine64 IRC we can maybe figure it out... http://uk.pine64.xyz:9090/?channels=Pine64&uio=MTE9MjE131


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

(06-18-2016, 04:57 PM)xalius Wrote:
(06-18-2016, 04:34 PM)respawned Wrote: I am getting an error when trying to install the GPIO Python module:
unable to execute 'aarch64-linux-gnu-gcc': No such file or directory

Hi, you are missing the GCC compiler. I havent used OpenHAB so I dont know what Linux distro it is based on to help you further, but if you want to join us in the Pine64 IRC we can maybe figure it out... http://uk.pine64.xyz:9090/?channels=Pine64&uio=MTE9MjE131

Yes.  The Ubuntu distribution is missing the gcc compiler also ...

sudo apt-get install gcc


(for OpenHAB, not so sure)

I am noticing an annoying anomally using the RPi.GPIO module from github; after a boot-up (the first time the GPIO gets used) I get the warning that the channel is already in use! All 'channels' should default to off, or quiesced, or whatever... but not in use. The module works, at least for input and output, and after I exit with a proper cleanup then everything is good after that.

Maybe there is a config option, or a startup option that could initialize the GPIO for first use?

marcus


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

(06-18-2016, 08:02 AM)martinayotte Wrote: @markus, the underscore is present in the original source.
https://github.com/swkim01/RPi.GPIO-PineA64/blob/master/RPi/GPIO/__init__.py
The problem that @jacobscarter faced is probably elsewhere.

Martinayotte any ideas on how to fix this?

I've started digging into the module on github but I have a lot to learn about c before I'll be too useful. Working on it anyway Tongue


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

ok, what happens if you spell :

import RPi_GPIO as GPIO

--------------------------------------

What version of the source are you using?
Which OS are you using?

Are you compiling from sources outside of the instructions on github, or are you using the github instructions?

sudo python setup.py install

This should not be that hard...


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

(06-18-2016, 11:12 PM)MarkHaysHarris777 Wrote: ok, what happens if you spell :

import RPi_GPIO as GPIO

--------------------------------------

What version of the source are you using?
Which OS are you using?

Are you compiling from sources outside of the instructions on github, or are you using the github instructions?

sudo python setup.py install

This should not be that hard...

import RPi_GPIO wouldn't make sense. If you look at the code RPI._GPIO is an extension module to the RPI.GPIO module.  Tried it anyway just to remove any doubts and got this error:

***
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named _GPIO
***

https://github.com/swkim01/RPi.GPIO-PineA64/blob/master/setup.py#L46

I am using the latest from the swkim01 repo: https://github.com/swkim01/RPi.GPIO-PineA64

On my Pine I am running Debian on top of the longsleep kernel.  Current kernel version: 3.10.102-0-pine64-longsleep

I followed the install instructions found in the README.md, to be super specific this is exactly what I ran:

sudo python setup.py install --record install-paths.txt

I don't feel like I can trust any of the other documentation in the repo because most of it is left-over that has not been removed from when the Raspberry Pi RPi.GPIO repo was forked. e.g. https://github.com/swkim01/RPi.GPIO-PineA64/blob/master/INSTALL.txt

I agree that this shouldn't be that hard... alas life is never that easy.

Any help from people familiar with the code would be appreciated very much. 

@aquilegia I don't suppose you have run into this before?

For now I am going to try and switch over and use this instead: https://pypi.python.org/pypi/pyA20


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

Yeah, sorry to hear. I'm trying to figure out what is different between my setup and yours... mine just worked, sorry.

Mine worked on both the stock debian, and ubuntu distros (from the downloads page) . This may be a permissions thing, or it may be related to the kernel version you're using.

I'll keep watching to see how things get resolved; please post here if you get it figured out. Best of luck to you, and again, sorry I couldn't help you.

marcus


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

In my case, RPi.GPIO-PineA64 worked out of the box using "python setup.py install", nothing else to do.

Beware that pyA20 doesn't use the same pins for A64, so some GPIOs are working but some other won't or simply not defined.