![]() |
Using GPIO pins - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: ROCKPRO64 (https://forum.pine64.org/forumdisplay.php?fid=98) +--- Forum: General Discussion on ROCKPRO64 (https://forum.pine64.org/forumdisplay.php?fid=99) +--- Thread: Using GPIO pins (/showthread.php?tid=6419) Pages:
1
2
|
Using GPIO pins - smartdave - 08-17-2018 I am sure this is a basic question, but where can I get the python libraries for the Rockpro64. I have tried the Rock64 from Laepo's github but I do not think they are right for the pro64 board. When I did try them in Ubuntu 18.04 Bionic lxde OS build I am getting the following errors when I try to access the pins: >>>Unable to export GPIO >>>Unable to set GPIO Direction Programming is fairly new to me, but I try to google everything before asking questions Thanks Dave RE: Using GPIO pins - mcerveny - 08-19-2018 Are you running under root ? Try it from bash under root user. Code: # cd /sys/class/gpio RE: Using GPIO pins - smartdave - 08-19-2018 This is what I get when I run the script rock64@rockpro64:~/gpio$ sudo ./test.sh active_low device direction edge power subsystem uevent value ./test.sh: 5: ./test.sh: active_low: not found 0 rock64@rockpro64:~/gpio$ RE: Using GPIO pins - mcerveny - 08-20-2018 Oh, no. Not this way. "#" indicate interactive root prompt (but comment in scripts). Your way: Code: rock64@rockpro64:~/gpio$ sudo bash RE: Using GPIO pins - smartdave - 08-20-2018 Thanks, I will try this later on today with a multimeter. I did try the above commands to make sure they work in the OS, and they do work in my rockpro64. Thanks ps I have done the light blinking and some other coding on the RP3 and arduinos, but getting the GPIO pins working on the Rockpro seems to be a little more involved RE: Using GPIO pins - smartdave - 08-21-2018 So I have this all figured out now. I have spoken with Allison (leapo), given her the new array values and she will be updating her python scripts to include the Rockpro64 board. Thanks for everyone's help, especially Mcerveny Until the new python scripts get updated you can use these values in the _GPIO.py file ROCK_valid_channels = [52,53,152,54,50,33,48,39,41,43,155,156,125,122,121,148,147,120,36,149,153,42,45,44,124,126,123,127] BOARD_to_ROCK = [0,0,0,52,0,53,0,152,148,0,147,54,120,50,0,33,36,0,149,48,0,39,153,41,42,0,45,43,44,155,0,156,124,125,0,122,126,121,123,0,127] BCM_to_ROCK = [43,44,52,53,152,155,156,45,42,39,48,41,124,125,148,147,124,54,120,122,123,127,33,36,149,153,121,50] RE: Using GPIO pins - Bullet64 - 09-20-2018 Thanks smartdave for your work. What I do not understand? How do I get the numbers out? http://files.pine64.org/doc/rockpro64/Rockpro64%20Pi-2%20Connector%20ver0.2.png My script Code: #!/usr/bin/env python More infos here -> https://forum.frank-mankel.org/topic/292/rockpro64-rp64-gpio (sry, only german) RE: Using GPIO pins - smartdave - 09-20-2018 What do you mean get the numbers out? I did all the conversions and came up with the following for CPU pin numbers. ![]() RE: Using GPIO pins - Bullet64 - 09-20-2018 That's what I meant. Thank You! RE: Using GPIO pins - Bullet64 - 09-20-2018 Quick test. All pins works except pin # 19 & 26 ![]() |