Skip to content

OrangePi Zero 3 wiringpi.wiringPiISR() is Fail #18

@winitboonkliang

Description

@winitboonkliang

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions