Skip to content

Python GPIO library for the Rock64 SBC (RPi.GPIO clone)

License

Notifications You must be signed in to change notification settings

MM-Lehmann/Rock64-R64.GPIO

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rock64-R64.GPIO

A Python GPIO library for the Rock64 single-board computer (RPi.GPIO clone).

Python Libraries and Scripts

R64.GPIO
A re-implementation of the RPi.GPIO library for the Rock64. Currently under development.

I found that on kernel version 4.4.124 the pin channels are offset by 1000, so I added a function ("offset") to check the kernel version and add the offset accordingly. Please use the 'Armbian-Xenial-kernel-4.4.103-to-4.4.156' branch if you are still using those particular kernel versions.

See the wiki for documentation on Functions and GPIO Modes.

R64-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.

Library Installation and Usage:

Importing R64.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.

  1. Download the entire "R64" folder from the repo.
  2. Place the "R64" folder in the same directory as the Python script you're working with.
  3. Within your script, substitute the traditional "import RPi.GPIO as GPIO" line for "import R64.GPIO as GPIO".

Once imported, syntax for implemented functions should be identical to RPi.GPIO.

Test Platform

All testing of this library is done on a Rock64 (4GB model) running Armbian_Buster.

Compatability with other versions of Linux running on the Rock64 is not gauranteed.

Resources

List of resources and reference material used while building the scripts and libraries in this repository

About

Python GPIO library for the Rock64 SBC (RPi.GPIO clone)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%