RPi.GPIO python module for Pine A64/A64+
#61
(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
  Reply
#62
I2C and SPI have already been added back in November : https://github.com/swkim01/RPi.GPIO-Pine...13214728bf
  Reply
#63
Thanks. Looking forward to trying it out.
  Reply
#64
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?
  Reply
#65
(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.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#66
(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
  Reply
#67
Again, you must have forgotten to do "cd RPi.GPIO-PineA64-master" before doing "python setup.py install" ...
  Reply
#68
(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
  Reply
#69
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
  Reply
#70
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++ ?
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  fm transmitter with gpio weasel18 2 4,828 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 3,596 06-12-2019, 10:37 AM
Last Post: dkebler
Lightbulb Sample GPIO codes highlighting RPi.GPIO-PineA64 and the PI bus MarkHaysHarris777 6 11,127 06-07-2019, 12:37 AM
Last Post: tllim
Star GPIO, SPI and I2C C++ Lib databit 7 11,211 02-04-2019, 05:45 AM
Last Post: Jeff R
Information Howto: Controlling Pine64 GPIO via the filesystem (sysfs) on linux pfeerick 4 11,850 01-24-2019, 03:36 AM
Last Post: Fifth
  GPIO and SPI SamR1 20 31,599 03-15-2018, 10:32 AM
Last Post: jomoengineer
Question GPIO shockr 7 14,767 03-11-2018, 01:52 AM
Last Post: jomoengineer
  Read GPIO problem shworker 14 21,166 08-17-2017, 01:21 PM
Last Post: martinayotte
  Cross-wired Uart Ports between two Pine Boards via Cat5 Cable MarkHaysHarris777 10 15,997 11-20-2016, 04:17 AM
Last Post: pfeerick
  GPIO fiq capability joseph 3 6,094 11-10-2016, 06:07 PM
Last Post: joseph

Forum Jump:


Users browsing this thread: 1 Guest(s)