You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using "Ubuntu image" to lunch my board. when I use "gpio readall" command, it shows me all pins info well. I want to use physical pin 7 (GPIO 2) to control an LED on/off as a test. Controlling the pin with bash is ok, and all these command like "gpio mode 2 out", "gpio write 2 0" works fine and could control LED as well.
--- So, the pin is OK and can control LED with bash command ---
The problem rises when I am using "OPi.GPIO" to control LED condition. I change the "pin_mapping" file to comply "Orange pi 5" board's pin_mapping. Now, everything also goes well and when I run my python code it change the value inside "/sys/class/gpio2/value" file from 0 to 1 and vice versa as it was demanded.
--- So, the code is also OK ---
But, It has no effect on the LED condition!
I mean it can change the value inside "value" file as programmed in "GPIO.py and sysfy.py" files, but has no effect on pin.
Thank anybody in advance if has any idea!? Do I miss something here?
The text was updated successfully, but these errors were encountered:
MostafaRaeisi
changed the title
Orange pi 5, OPi.GPIO.output() change the value file but it doesn't change the physical pin condition
Orange pi 5, OPi.GPIO.output() does change the value inside ".../gpio2/value" file but it doesn't change the physical pin condition
Jun 5, 2024
Hi everyone,
I am using "Ubuntu image" to lunch my board. when I use "gpio readall" command, it shows me all pins info well. I want to use physical pin 7 (GPIO 2) to control an LED on/off as a test. Controlling the pin with bash is ok, and all these command like "gpio mode 2 out", "gpio write 2 0" works fine and could control LED as well.
--- So, the pin is OK and can control LED with bash command ---
The problem rises when I am using "OPi.GPIO" to control LED condition. I change the "pin_mapping" file to comply "Orange pi 5" board's pin_mapping. Now, everything also goes well and when I run my python code it change the value inside "/sys/class/gpio2/value" file from 0 to 1 and vice versa as it was demanded.
--- So, the code is also OK ---
But, It has no effect on the LED condition!
I mean it can change the value inside "value" file as programmed in "GPIO.py and sysfy.py" files, but has no effect on pin.
Thank anybody in advance if has any idea!? Do I miss something here?
The text was updated successfully, but these errors were encountered: