How can I use a python script to respond to a gpio button being pressed for a roc-rk3328-cc?
Have you reviewed this post :-
How to control GPIO via Python 3
You will definitely need to know the pin mapping for the 3328.
I saw libregpio is used for AML-S905X-CC. Is there a python library that works with the 3328?
Can you use gpioset & gpioget ?
In which case this was my first attempt blinking LED’s on the Le Potato - you would have to get the right chip and pin number for the 3328. I don’t have one so I don’t have any experience. It’s pretty crude and in the absence of any better advice it was the best I could come up with.
import time #for timing delays
for i in range(0,10):
print(“Switching on Led”)
os.system(‘python3 gpioset.py 1 97=1’)
print(“Switching off Led”)
os.system(‘python3 gpioset.py 1 97=0’)