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

Allow inversion of input GPIO #997

Merged
merged 2 commits into from
Jun 26, 2021

Conversation

qistoph
Copy link
Contributor

@qistoph qistoph commented Jun 24, 2021

This PR enables users of the input GPIO to switch the on/off values.

Rationale:
The ESP8266 uses internal pull-up for input GPIO. A common use case is to use a switch to pull the input to ground. So the value is LOW while the button is pressed and HIGH otherwise.

Swapping the values for INPUT_GPIO_ON_VALUE and INPUT_GPIO_OFF_VALUE introduced in this PR, makes a LOW button report as On.

@1technophile 1technophile added this to the v0.9.7 milestone Jun 26, 2021
@1technophile
Copy link
Owner

thanks!

@1technophile 1technophile merged commit d2ff32d into 1technophile:development Jun 26, 2021
@qistoph qistoph deleted the pr_gpio_invert branch July 8, 2021 11:21
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

Successfully merging this pull request may close these issues.

2 participants