Adding in lower sleep times

#46
Adding in smaller times for sleep
This commit is contained in:
Ben V. Brown
2017-08-09 10:28:51 +10:00
parent 9969c66520
commit c3d672c0dd
4 changed files with 27 additions and 13 deletions

View File

@@ -44,7 +44,7 @@ void StartUp_Accelerometer(uint8_t sensitivity) {
I2C_RegisterWrite( CTRL_REG2, 0x40); // Reset all registers to POR values
delayMs(2); // ~1ms delay
I2C_RegisterWrite(FF_MT_CFG_REG, 0x78); // Enable motion detection for X and Y axis, latch enabled
uint8_t sens = 9 * 6 + 3;
uint8_t sens = 9 * 6 + 5;
sens -= 6 * sensitivity;
I2C_RegisterWrite(FF_MT_THS_REG, 0x80 | sens); // Set threshold