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

add begin() with device type, so device type can be set in SETUP() after being read from a config source #78

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

species5618
Copy link

really simple change to support my use case

i have a ESP8266 board which i plan to fit DHT11 or DHT22 to, the type will vary depending on use,
rather than recompile my code each time, i need to be able to set the device type at runtime (via a configuration file (SPIFFS), web page on ESP8266) not design time

adding an additional constructor which does not require type to be specified
adding an additional begin() which accepts device type

achieves this, as it allows me to set the device type in the setup section after fetching and configuration from SPIFFS

DHT.zip

added void DHT::begin(uint8_t type)
void DHT::begin(uint8_t type);
ADD Ability to change sensor type after instantiation for use with a configuration PCB i am developing
void DHT::begin(uint8_t type);
copy and paste error
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.

None yet

1 participant