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+ - psychedup - 04-10-2018

(04-10-2018, 03:17 AM)xalius Wrote: Are you using spidev?

I'm not sure, but I don't think so. I put my code on github here so you can see what I'm doing.

I initially took the code from Adafruit, but since this library uses a different implementation for SPI (and I2C) I modified it to work on the pine64.

Nokia5110.py is my modified library.
nokia_test2.py draws some shapes and text on the display.
nokia_clock2.py draws a very simple analog clock.


RE: RPi.GPIO python module for Pine A64/A64+ - xalius - 04-12-2018

Can you pastebin the debug output you see on your console?


RE: RPi.GPIO python module for Pine A64/A64+ - psychedup - 04-12-2018

(04-12-2018, 03:54 AM)xalius Wrote: Can you pastebin the debug output you see on your console?

sure here's a snippet of it:

Code:
tx[0]=00
tx[1]=00
tx[2]=00
tx[3]=00
tx[4]=00
tx[5]=00
tx[6]=00
tx[7]=00
tx[8]=00
tx[9]=00
tx[10]=00

It looks like whatever is being sent over SPI is also being dumped to the screen. I'd like to be able to turn this off, as it makes it difficult to find anything else that I try printing.


RE: RPi.GPIO python module for Pine A64/A64+ - cathenna10 - 01-23-2019

I endeavored to introduce it. Amid the establishment, it gived to me a blunder: 

"Python.h can't discovered record or catalog" 

I am certain to have Python introduced, in such a case that I express "python" in terminal, it returns me the adaptation

Python Training


RE: RPi.GPIO python module for Pine A64/A64+ - pfeerick - 05-22-2020

Has there been any change in this of late? I'm trying to resurrect some old python2 code on my pine64s (and port it to python3) but installing via library by cloning the repo and doing a `sudo python setup.py install` on a fresh build of Manjaro ARM is getting me the dreaded errror:
Code:
Traceback (most recent call last):
  File "./pine64-fan-control.py", line 9, in <module>
    from RPi import GPIO as GPIO
  File "/usr/lib/python3.8/site-packages/RPi/GPIO/__init__.py", line 23, in <module>
    from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!

Idealy I'd install it in a venv, but I'm not that far yet, and I've not installed the 'official' RPI version, so basically no idea what's going on now!


RE: RPi.GPIO python module for Pine A64/A64+ - CJPOLO - 05-23-2020

I am also interested if anyone ever got event detection (interrupts) to work and if so what modificaitons were made to the dts to enable this?


RE: RPi.GPIO python module for Pine A64/A64+ - jamesmartel - 01-08-2021

MarkHaysHarris777 Wrote:the module name should be RPi.GPIO,  not RPi._GPIO
I am looking for steps to download and install RPi.GPIO on my Pine64 A64. For some reason my original SD card and steps from 2016 are missing and my SD card is corrupt. This is possibly why it was moth-balled. BUt I am revisiting and have Armbian image installed and have HDMI and LCD, WIFI and BT working. Now I'd like to get this SBC to control a Robot. I could not get RPi.GPIO or Wiring to install


RE: RPi.GPIO python module for Pine A64/A64+ - ncs - 02-23-2022

Hi all,
i've the following error when I try to install RPi.GPIO-PineA64 via command sudo python3 setup.py install:

source/py_gpio.c: In function ‘py_setup_channel’:
/usr/include/python3.9/object.h:633:41: error: expected ‘(’ before ‘PyType_HasFeature’
633 | #define PyType_FastSubclass(type, flag) PyType_HasFeature(type, flag)
| ^~~~~~~~~~~~~~~~~
/usr/include/python3.9/listobject.h:25:5: note: in expansion of macro ‘PyType_FastSubclass’
25 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS)
| ^~~~~~~~~~~~~~~~~~~
source/py_gpio.c:247:14: note: in expansion of macro ‘PyList_Check’
247 | } else if PyList_Check(chanlist) {
| ^~~~~~~~~~~~
source/py_gpio.c:247:37: error: expected ‘;’ before ‘{’ token
247 | } else if PyList_Check(chanlist) {
| ^
source/py_gpio.c: In function ‘chan_from_gpio’:
source/py_gpio.c:580:39: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
580 | if (*(pinToGpioPineA64+chan) == gpio)
| ^~
source/py_gpio.c:592:32: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
592 | if (*(*pin_to_gpio+chan) == gpio)
| ^~
source/py_gpio.c: In function ‘PyInit__GPIO’:
source/py_gpio.c:1065:4: warning: ‘PyEval_ThreadsInitialized’ is deprecated [-Wdeprecated-declarations]
1065 | if (!PyEval_ThreadsInitialized())
| ^~
In file included from /usr/include/python3.9/Python.h:145,
from source/py_gpio.c:23:
/usr/include/python3.9/ceval.h:129:36: note: declared here
129 | Py_DEPRECATED(3.9) PyAPI_FUNC(int) PyEval_ThreadsInitialized(void);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
source/py_gpio.c:1066:7: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
1066 | PyEval_InitThreads();
| ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.9/Python.h:145,
from source/py_gpio.c:23:
/usr/include/python3.9/ceval.h:130:37: note: declared here
130 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
| ^~~~~~~~~~~~~~~~~~
error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1

--

Can anyone helps me to find out the solution?

MT


RE: RPi.GPIO python module for Pine A64/A64+ - Fadazo - 12-15-2022

(07-06-2022, 10:13 AM)Zerext Wrote: python work well for create apps. The pandemic has boosted the demand for the digitization of services. People are increasingly looking for online courses, coaching sessions, and on-demand services. So, creating an online service marketplace platform is a profitable business idea at the present time. That’s why I decided to follow guide about 

Well, it seems to me that such manuals are already completely outdated.