-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OrangePi Zero 3 wiringpi.wiringPiISR() is Fail #18
Comments
Orange Pi Zero 2
Result:
Problem: gpio_callback does not working |
Hi, it seems we both have the same issue. Did you somehow got it fixed? |
一样的问题,插个眼 |
OrangePi Zero 3
2G RAM Model
Linux orangepizero3 5.4.125 #1.0.0 SMP Fri Jun 30 11:59:12 CST 2023 aarch64 GNU/Linux
Step install wiringOP-Python with python3.9.2
git clone --recursive https://github.com/orangepi-xunlong/wiringOP-Python -b next
cd wiringOP-Python
git submodule update --init --remote
python3 generate-bindings.py > bindings.i
sudo python3 setup.py install
code python3
import wiringpi
PIN_TO_SENSE = 5
def gpio_callback():
print("GPIO_CALLBACK!")
#wiringpi.wiringPiSetupGpio() # case 1
wiringpi.wiringPiSetup() # case 2
wiringpi.pinMode(PIN_TO_SENSE, wiringpi.GPIO.INPUT)
wiringpi.pullUpDnControl(PIN_TO_SENSE, wiringpi.GPIO.PUD_UP)
wiringpi.wiringPiISR(PIN_TO_SENSE, wiringpi.GPIO.INT_EDGE_BOTH, gpio_callback)
while True:
wiringpi.delay(2000)
Result
case 1 used wiringpi.wiringPiSetupGpio()
sudo python3 wiringOP-Python/examples/callback.py
Pin mode failed!
case 2 used wiringpi.wiringPiSetup()
wiringPiISR: unable to open /sys/class/gpio/gpio70/value: No such file or directory
The text was updated successfully, but these errors were encountered: