Skip to content

Allow inversion of input GPIO#997

Merged
1technophile merged 2 commits into1technophile:developmentfrom
qistoph:pr_gpio_invert
Jun 26, 2021
Merged

Allow inversion of input GPIO#997
1technophile merged 2 commits into1technophile:developmentfrom
qistoph:pr_gpio_invert

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
JeroenWiersma pushed a commit to JeroenWiersma/OpenMQTTGateway that referenced this pull request Oct 18, 2025
* Allow inversion of input GPIO

* Fix formatting
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