-
Notifications
You must be signed in to change notification settings - Fork 13
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
The initial arguments defined in setup function does not take effect #49
Comments
Hi, Thanks for raising this issue, I'll look into it and see what I can find. |
I think I may know what's the problem. |
I was able to reproduce this issue. Definitely worth fixing. I extended your code slightly to create this reproducer: #!/bin/python3
from RPi import GPIO
from RPi import GPIO_DEVEL
pin=22
GPIO.setmode(GPIO.BCM)
GPIO.setup(pin, GPIO.OUT, initial=GPIO.LOW) # It does not set the initial value to low.
input()
GPIO_DEVEL.Reset()
GPIO.setmode(GPIO.BCM)
GPIO.setup(pin, GPIO.OUT, initial=GPIO.HIGH) # Same behavior as initial=GPIO.LOW
input() Would you like to submit a fix yourself? If not, I will patch the code. |
I think this is a bug from the python binding of the libgpiod. This link is how the I think I can submit a fix for this strange behavior by hardcoding the value of |
@vava24680 hey, are you still working on this? |
Sorry for the delay, I think I may patch this bug on this weekend. |
Hi, I had the problem that the
initial
argument defined insetup
function does not take effect. Below is what I did.I ran this code under the newest version of this package and the platform is Raspberry Pi 4B+.
No matter I passed low or high, it always set the same initial value. Can somebody help me or point out what's going on?
Thank you
The text was updated successfully, but these errors were encountered: