Skip to content
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

[Support question and proposal] How to set a GPIO pin to default HIGH before setting it to output? #570

Open
Wikinaut opened this issue Apr 17, 2023 · 0 comments

Comments

@Wikinaut
Copy link

https://raspberrypi.stackexchange.com/a/90002 explains for the RPi.GPIO library how an initial value can be defined when setting up an output pin:

Initial output value - RPi.GPIO library only -

GPIO.setup(17, GPIO.OUT, initial=GPIO.HIGH) # GPIO 17 as output, initial value high

I could not find a similar option in your library setup for Python (Raspberry-Pi-use):

https://abyz.me.uk/rpi/pigpio/python.html#set_mode

pi.set_mode(17, pigpio.OUTPUT) # GPIO 17 as output

Proposal

I propose to add an optional parameter in pigpio.set_mode for initial values when defining output pins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant