mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user