A Python GPIO library for the Rock64 single-board computer (RPi.GPIO clone).
RP64.GPIO
A re-implementation of the RPi.GPIO library for the Rock64. Currently under development.
See the wiki for documentation on Functions and GPIO Modes.
RP64-GPIO-test.py
A simple test script. Outputs a list of internal vars, sets the GPIO mode to "BOARD", sets up a GPIO output (blinks an LED if connected to pin 16), sets up a GPIO input (pulls-up and reports the state of pin 18), then cleans up all GPIO exports and exits.
Importing RP64.GPIO
Below is the reccomended method for importing this library into your project. For alternate methods, see the Installation and Usage page in the wiki.
- Download the entire "RP64" folder from the repo.
- Place the "RP64" folder in the same directory as the Python script you're working with.
- Within your script, substitute the traditional "
import RPi.GPIO as GPIO
" line for "import RP64.GPIO as GPIO
".
or
sudo pip3 install git+https://github.com/Angoosh/RockPro64-RP64.GPIO
Once imported, syntax for implemented functions should be identical to RPi.GPIO.
All testing of this library is done on a RockPro64 2GB running Armbian 5.67 Stretch Compatability with other versions of Linux running on the RockPro64 is not guaranteed.
List of resources and reference material used while building the scripts and libraries in this repository
- Github Leapo
- Pine64 Forum - GPIO LED blinker using SYSFS on the Rock64
- RockPro64 Pi-2 bus definition
GPIO pin 26 doesn't work. Scripts must be run as root