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

please add "readHeater" function #2

Open
Sisyphos0 opened this issue Jun 28, 2023 · 0 comments
Open

please add "readHeater" function #2

Sisyphos0 opened this issue Jun 28, 2023 · 0 comments

Comments

@Sisyphos0
Copy link

Hi,

Great Lib, thanks enjoyneering!

May I suggest addition of a "readHeater" function like this:

class HTU2xD_SHT2x_SI70xx {
public:
...
bool readHeaterEnabled(void);
...
};

bool HTU2xD_SHT2x_SI70xx::readHeaterEnabled(void){
uint8_t userRegData = _readRegister(HTU2XD_SHT2X_SI70XX_USER_READ_REG);
bool heaterEnabled = ((userRegData & HTU2XD_SHT2X_SI70XX_USER_CTRL_HEATER_ON)?true:false);
return heaterEnabled;
}

Tested with ESP32 & SHT20.

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