sparkfun / SparkFun_ADXL345_Arduino_Library

Arduino Library for the ADXL345
46 stars 52 forks source link

Strange actions in powerOn() #18

Open AlexanderKokushkin opened 4 years ago

AlexanderKokushkin commented 4 years ago

Hello, in function powerOn() I see that whole register POWER_CTL value instantly being changed from 0 to 16 and eventually to 8.

writeTo(ADXL345_POWER_CTL, 0);  // Wakeup
writeTo(ADXL345_POWER_CTL, 16); // Auto_Sleep
writeTo(ADXL345_POWER_CTL, 8);  // Measure

Maybe you wanted to set all these bits ( 8Hz Frequency and AutoSleep and Measuring mode )? e.g. 24?