mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-09-14 18:46:59 +00:00
[P120] Sparkfun ADXL345 library add powerOff() (from github pull request)
This commit is contained in:
@@ -64,6 +64,14 @@ void ADXL345::powerOn() {
|
||||
writeTo(ADXL345_POWER_CTL, 8); // Measure
|
||||
}
|
||||
|
||||
void ADXL345::powerOff() {
|
||||
byte _b;
|
||||
|
||||
readFrom(ADXL345_POWER_CTL, 1, &_b);
|
||||
_b &= ~(0b00001000); // Measure bit
|
||||
writeTo(ADXL345_POWER_CTL, _b);
|
||||
}
|
||||
|
||||
int ADXL345::getDevID() {
|
||||
byte _b;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user