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+ - tjctjc - 01-29-2017

(08-11-2016, 02:53 PM)MarkHaysHarris777 Wrote: @Wolfenstein, thank you for the effort;  very nice!

... its good to see other folks interested in the GPIO ; the more the community gets involved with connecting this PineA64 to the world via GPIO , the better.   It might be nice if a couple of us can dive into the RPi.GPIO-PineA64 code a bit, maybe even fork it, and not only get some of the kinks ironed out, but also get i2c, i2s, SPI, and pwm working...

What do you think would be involved in getting i2c working? I've a load of i2c boards from my Pi collection that I'd like to see working on the Pine64.

Tony


RE: RPi.GPIO python module for Pine A64/A64+ - martinayotte - 01-29-2017

I2C and SPI have already been added back in November : https://github.com/swkim01/RPi.GPIO-PineA64/commit/6fd3304162907ab00bf27ac53abf1313214728bf


RE: RPi.GPIO python module for Pine A64/A64+ - tjctjc - 01-29-2017

Thanks. Looking forward to trying it out.


RE: RPi.GPIO python module for Pine A64/A64+ - Blackfalcon - 02-08-2017

Hi, I'm new with the Pine 64 board, but I have some experience with the Arduino board. I downloaded two operating systems for my Pine 64 using two microsd cards, the two operating systems are debian jessie with mate by Lenny Raposo and the Ubuntu desktop image based on longsleep, that were downloaded at this link http: // Wiki.pine64.org/index.php/Pine_A64_Software_Release. After I installed the two operating systems in the microsd cards, I followed the Github steps to install RPi.GPIO https://github.com/swkim01/RPi.GPIO-PineA64 to use in the python language using pi 2 Bus GPIO. I´ve followed all the steps, but when I go to the python command setup.py install or python3 setup.py install, the terminal returns this message "can not open the file 'setup.py': [Errno 2] not such File or directory, "but when I looked at the file system, I found setp.py in /usr/lib/python2.7/dist-packages and even if I entered that directory using the cd command, is showed the same mistake. This problem is appearing on both operating systems, would you like to know if have any solutions to this problem?


RE: RPi.GPIO python module for Pine A64/A64+ - MarkHaysHarris777 - 02-08-2017

(02-08-2017, 08:44 AM)Blackfalcon Wrote: Hi, I'm new with the Pine 64 board, ... This problem is appearing on both operating systems, would you like to know if have any solutions to this problem?

Unpack the modules files into a working directory and run the setup.py from there;  use 

cd /working/directory

sudo python setup.py

... try that and see what happens.


RE: RPi.GPIO python module for Pine A64/A64+ - Blackfalcon - 02-08-2017

(02-08-2017, 09:05 AM)MarkHaysHarris777 Wrote:
(02-08-2017, 08:44 AM)Blackfalcon Wrote: Hi, I'm new with the Pine 64 board, ... This problem is appearing on both operating systems, would you like to know if have any solutions to this problem?

Unpack the modules files into a working directory and run the setup.py from there;  use 

cd /working/directory

sudo python setup.py

... try that and see what happens.
I unzipped the module files to a working directory but when I enter the sudo phyton setup.py command, the terminal returns the same message. When I try to program in python it returns me that the module was not imported correctly


RE: RPi.GPIO python module for Pine A64/A64+ - martinayotte - 02-08-2017

Again, you must have forgotten to do "cd RPi.GPIO-PineA64-master" before doing "python setup.py install" ...


RE: RPi.GPIO python module for Pine A64/A64+ - Karo - 02-14-2017

(02-08-2017, 12:48 PM)martinayotte Wrote: Again, you must have forgotten to do "cd RPi.GPIO-PineA64-master" before doing "python setup.py install" ...

Hi I have a problem with connecting Pine A64+ and MCP3008 digital/analog converter. 
Can you help me how connect it to my Pine and read data from analog inputs  ?

Regards

Karlo


RE: RPi.GPIO python module for Pine A64/A64+ - martinayotte - 02-14-2017

I don't have any MCP3008, but according to the specs, looking specifically to section No.6, it is explain how to deal with 8 bits SPI.
In summary, you should do a transfer of 3 bytes and you will read 3 bytes. The bytes sent should be [0x01, 0x80, 0x00] for example for getting single-ended conversion of the channel 0.
The 3 read bytes should be [0x00, 0x03, 0xFF] if the voltage input is at the maximum, assuming there is a pull-down on MISO, otherwise left floating, some more bits can become HIGH in the fist 2 bytes.

For code, it should looks like :

Code:
from pyA20 import spi

spi.open("/dev/spidev0.0")
data = spi.xfer([0x01, 0x80, 0x00], 3)
print data



RE: RPi.GPIO python module for Pine A64/A64+ - JasperBrown - 02-18-2017

hallo,
I installed the RPi.GPIO-A64 from git on a ubuntu longsleep image - by all steps:
- Installed Python and Python3, Python-dev
- pip(ed) the Rasp.Pi GPIO
- sudo python setup.py install

Than tried test.py from the test folder and received somthing like:
GPIO only usable on RaspberPI!


Did I missed somthing?!
Huh

ps.

wiringPI is a lib for C/C++ ?