Wich GPIO numbers use for ROC-RK3328-CC?
#1
I was using python GPIO library for ROCK64: Rock64-R64.GPIO and it didnt work, i used an offset of 1000 as is in this repository Matei Rock64-R64.GPIO  , modified the offset to be 1002 and just work for pin 16 with this script:

# Set Variables
var_gpio_out = 16


# GPIO Setup
GPIO.setwarnings(True)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(var_gpio_out, GPIO.OUT, initial=GPIO.HIGH)       # Set up GPIO as an output, with an initial state of HIGH


# Test Output
print("Testing pin: " +  str(var_gpio_out))
print("Testing GPIO Input/Output:")


while True:
print("HIGH")
GPIO.output(var_gpio_out, GPIO.HIGH)
sleep(1)
print("LOW")
GPIO.output(var_gpio_out, GPIO.LOW)
sleep(1)




After that i was trying to use this commands to make work each pin, i chose numbers randomly.

firefly@firefly:~$ ls /sys/class/gpio/

export  gpiochip1000  gpiochip1032  gpiochip1064  gpiochip1096  gpiochip1510  unexport

# enter root mode
firefly@firefly:~$sudo -i
# using pin 16

root@firefly:~# sudo echo 1103 > /sys/class/gpio/export 
# set pin 16 to 0
root@firefly:~# echo 0 > /sys/class/gpio/1103/value 
root@firefly:~# echo 1 > /sys/class/gpio/1103/value 

after try and error with many numbers i found that 1103 works for pin 16 and 1101 works for pin 18, but i cant figure out the others numbers.
#2
Well i solved this by mysleft, i left this repository in case someone need it.

https://github.com/robotgruntxd/GPIO-ROC-RK3328-CC


Possibly Related Threads…
Thread Author Replies Views Last Post
  Disable MicroSD reader for extra GPIO mxruben 0 252 07-27-2024, 10:08 PM
Last Post: mxruben
  Python GPIO Library for the Rock64 (R64.GPIO) Leapo 37 75,851 07-02-2021, 03:20 PM
Last Post: klausfelix
  UARTs from GPIO headers maks.dav 1 2,630 10-27-2020, 12:06 PM
Last Post: martinayotte
  ROCK64 RK3328 state of 4K (and FHD) video playback in FBdev kroko 3 4,912 03-31-2019, 11:43 AM
Last Post: kroko
  C++ GPIO seg fault on Rock64 using Pine64-CPP Jeff R 1 3,720 02-06-2019, 07:40 PM
Last Post: Jeff R
  GPIO LED blinker using SYSFS on the Rock64 MarkHaysHarris777 20 44,571 08-09-2018, 10:52 AM
Last Post: ulysse132

Forum Jump:


Users browsing this thread: 1 Guest(s)