How to use RPi.GPIO

Hi,

I'm a beginner in OpenWrt and I'm using RPi zero w.

I installed pip and RPi.GPIO python module but when i use it test program it is giving import error, is there anyway to solve this.

Error i got:

root@OpenWrt:~# python test.py
Traceback (most recent call last):
  File "/root/test.py", line 1, in <module>
    import RPi.GPIO as GPIO    # Import Raspberry Pi GPIO library
  File "/usr/lib/python3.10/site-packages/RPi/GPIO/__init__.py", line 23, in <module>
    from RPi._GPIO import *
ModuleNotFoundError: No module named 'RPi._GPIO'

Thanks

good thinking, it's always wise to create a help me post, without actually posting
the error message you require help with ...

1 Like

Sorry, my bad. I have edited the post with error message i got