Created
February 19, 2023 06:41
-
-
Save reefwing/133c03dfb99b9a6b7300fe88c5ec1487 to your computer and use it in GitHub Desktop.
LPS22HB Who Am I Stub
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
byte ReefwingLPS22HB::whoAmI() { | |
Wire1.beginTransmission(_address); | |
Wire1.write(LPS22HB_WHO_AM_I); | |
Wire1.endTransmission(); | |
Wire1.requestFrom(_address, 1); | |
return Wire1.read(); | |
} | |
bool ReefwingLPS22HB::connected() { | |
return (whoAmI() == LPS22HB_WHO_AM_I_VALUE); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment