PINE64
GPIO and SPI - 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: GPIO and SPI (/showthread.php?tid=2074)

Pages: 1 2 3


RE: GPIO and SPI - MarkHaysHarris777 - 08-27-2016

(08-27-2016, 07:14 AM)DonFL Wrote: Marcus, I'm curious if you've had that conversation with Gordon re helping with wiringPi for the Pine, or not as yet. Sounds like you did, and he was interested. Reason i ask is, awhile back, month or so,  I pinged him and inquired about wiring pi for the Pine, and got a very direct "not interested..", but may have just caught him on a bad day, or he just needs the right person to ask. And it very well could be a non-issue if Richard is able to complete his project.

The initial response I received was , "interested but unable to devote any time to it". He indicated that other people have ported his stuff to other platforms, and he encouraged me to go for it ...  what changed the scenario was tllim offering to send him a board if he would work on it. (that was the discussion we were in via email when KB3VGW posted his stuff to pine64.pro.  My next step with Gordon was negotiating to exchange the board for motive and interest.   Smile   That is where it got left...


RE: GPIO and SPI - louwie17 - 04-17-2017

Is there any new updates on getting wiringPi to work on the Pine64? I tried getting this repo to work https://github.com/pfeerick/wiringPi-Pine64, but not sure how different the gpio layout is on the Pine vs the pi. I was hoping I just needed to make some minor changes, but that didn't seem to be the case.
Just wondering if someone got this working? I would prefer to write in C/C++ instead of python.


RE: GPIO and SPI - pkfpeters - 04-21-2017

I also did not find any working WiringPI solution for the Pine64.
I will try to make a version for the Pine64 myself by using the
latest release from https://git.drogon.net/ and differences in
pfeerick release and items already working in the Python
version. I will post a link as soon as i got it working.


RE: GPIO and SPI - louwie17 - 04-21-2017

(04-21-2017, 12:53 AM)pkfpeters Wrote: I also did not find any working WiringPI solution for the Pine64.
I will try to make a version for the Pine64 myself by using the
latest release from https://git.drogon.net/ and differences in
pfeerick release and items already working in the Python
version. I will post a link as soon as i got it working.

Awesome, thanks pkfpeters  Smile


RE: GPIO and SPI - pkfpeters - 04-21-2017

Small update: I have changed the detection routines of the original code. It is now able to detect a Pine A64.
I am currently working on reworking the base address and gpio pin mapping; this is taking more work because
i also want to understand what i am doing; i am using the Rpi.GPIO source and the processor manual to
understand how the mapping is done.

It will be a hack on drogon's code, because it currently is too much work to make it like i normally would have
done. Gordon's wiringPi is perfect for Raspberry Pi's, but does not leave much room for other non Rpi boards.
Non the less, i am still very happy and gratefull for using his wiringPi code because a lot is done and it opens
up the possibility of using the openPLC project for industrial automation.

I will keep you informed.


RE: GPIO and SPI - pkfpeters - 04-28-2017

Another update: Did not had much time working on it. Currently i have made some changes in address lookup based on pine64 switch statement and i am currently trying to make a new mapping in order to control the correct GPIO pins. After this is done i will do some test to find out if i can actually control the correct pins. Once that is done i will release the source so others can also test it. I still need to work on rewriting PWM control etc. but first things first...


RE: GPIO and SPI - louwie17 - 05-05-2017

(04-28-2017, 07:13 AM)pkfpeters Wrote: Another update: Did not had much time working on it. Currently i have made some changes in address lookup based on pine64 switch statement and i am currently trying to make a new mapping in order to control the correct GPIO pins. After this is done i will do some test to find out if i can actually control the correct pins. Once that is done i will release the source so others can also test it. I still need to work on rewriting PWM control etc. but first things first...

Sounds great, by the way I ran across this repo: https://github.com/ayufan-pine64/dht22-pine64/blob/master/wiringPi.c where the guy uses the python library source code straight away. Incase this might be of some help to you. I have been using it to set up the event listeners, so I could use the RCSwitch library, although haven't quite got it working yet.


RE: GPIO and SPI - pkfpeters - 06-12-2017

Hi louwie17,

Sorry for the delay but i just keep getting occupied with all kind of other stuff.
I did not have the time to make additional changes. I still need to make it work
because i have to use the gpio pins in my future projects. Alternatively i could also
go for a different library and make support for that library in openplc... who knows.

So just to let you know i'm not abandoning this project. I just need some projects
to finish before i can continue on this one. I keep you informed.


RE: GPIO and SPI - louwie17 - 06-12-2017

(06-12-2017, 08:30 AM)pkfpeters Wrote: Hi louwie17,

Sorry for the delay but i just keep getting occupied with all kind of other stuff.
I did not have the time to make additional changes. I still need to make it work
because i have to use the gpio pins in my future projects. Alternatively i could also
go for a different library and make support for that library in openplc... who knows.

So just to let you know i'm not abandoning this project. I just need some projects
to finish before i can continue on this one. I keep you informed.

No worries at all, I have hardly had time myself to continue to poke around, although I have managed to get a radio receiver working with the RCSwitch library, and mimicking how wiringPi does it's events. I have been wanting to share it, but running into one caveat where I can only run the program once, when I run it a second time it gets stuck on the 'poll' request. Not sure if I hit the limit of file descriptors or if I am not cleaning up correctly, or if it is a PINE64 issue.
Might create a new thread for it, once I have done some more debugging.


RE: GPIO and SPI - louwie17 - 06-20-2017

Hey @pkfpeters, I have been working on getting a radio receiver/transmitter to work on the pine64 using the RCswitch library, which uses the wiringPi library. The biggest hurtle was getting the event callback stuff to work for the receiving end, but for the rest most of the general wiringPi functionality is there (I think).
I haven't spend to much time cleaning things up, so I hope the code is somewhat readable. Here is a link: https://github.com/louwie17/receiver-pine64/blob/master/wiringPi.c