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.

[email protected]:~$ ls /sys/class/gpio/

export  gpiochip1000  gpiochip1032  gpiochip1064  gpiochip1096  gpiochip1510  unexport

# enter root mode
[email protected]:~$sudo -i
# using pin 16

[email protected]:~# sudo echo 1103 > /sys/class/gpio/export 
# set pin 16 to 0
[email protected]:~# echo 0 > /sys/class/gpio/1103/value 
[email protected]:~# 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.
  Reply
#2
Well i solved this by mysleft, i left this repository in case someone need it.

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


Possibly Related Threads...
Thread Author Replies Views Last Post
  Python GPIO Library for the Rock64 (R64.GPIO) Leapo 32 12,721 05-12-2019, 02:46 PM
Last Post: tllim
  ROCK64 RK3328 state of 4K (and FHD) video playback in FBdev kroko 3 326 03-31-2019, 11:43 AM
Last Post: kroko
  C++ GPIO seg fault on Rock64 using Pine64-CPP Jeff R 1 237 02-06-2019, 07:40 PM
Last Post: Jeff R
  GPIO LED blinker using SYSFS on the Rock64 MarkHaysHarris777 20 7,825 08-09-2018, 10:52 AM
Last Post: ulysse132

Forum Jump:


Users browsing this thread: 1 Guest(s)