Skip to content

Commit

Permalink
Retune acceleromter to be more sensive
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben V. Brown authored and Ben V. Brown committed Sep 29, 2016
1 parent 5a581b7 commit 718cfc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion workspace/ts100/src/MMA8652FC.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void StartUp_Acceleromter(void) {
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
I2C_RegisterWrite(FF_MT_THS_REG, 0x10); // Set threshold to about 0.25g
I2C_RegisterWrite(FF_MT_THS_REG, 0x0F); // Set threshold
I2C_RegisterWrite(FF_MT_COUNT_REG, 0x01); // Set debounce to 100ms

I2C_RegisterWrite( CTRL_REG4, 0x04); // Enable motion interrupt
Expand Down
4 changes: 2 additions & 2 deletions workspace/ts100/src/Modes.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ void ProcessUI() {
//We need to check the timer for movement in case we need to goto idle
if (systemSettings.movementEnabled)
if (millis() - getLastMovement()
> (systemSettings.SleepTime * 10000)) {
> (systemSettings.SleepTime * 60000)) {
if (millis() - getLastButtonPress()
> (systemSettings.SleepTime * 10000)) {
> (systemSettings.SleepTime * 60000)) {
operatingMode = SLEEP;
return;
}
Expand Down

0 comments on commit 718cfc4

Please sign in to comment.