Last active
April 8, 2023 08:14
-
-
Save reefwing/acc65edebabb246170cb7b15a05fc1b2 to your computer and use it in GitHub Desktop.
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
void ReefwingLSM9DS1::reset() { | |
writeByte(LSM9DS1AG_ADDRESS, LSM9DS1AG_CTRL_REG8, 0x05); | |
writeByte(LSM9DS1M_ADDRESS, LSM9DS1M_CTRL_REG2_M, 0x0c); | |
delay(20); | |
// Check that chip boot up is complete - bit 3 is BOOT_STATUS | |
// Mask the STATUS_REG with 0b00001000 = 0x08 | |
while ((readByte(LSM9DS1AG_ADDRESS, LSM9DS1AG_STATUS_REG) & 0x08) != 0) { | |
yield(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment