|
固定4步來一個中斷,停止走路時再來一個中斷,靈敏度是10寄存器
bResult = gsensor_i2c_write_byte(0x10, 0x2a);
bResult = gsensor_i2c_write_byte(0x0f, 0x04);
bResult = gsensor_i2c_write_byte(0x12, 0x8f);
bResult = gsensor_i2c_write_byte(0x13, 0x10);
bResult = gsensor_i2c_write_byte(0x14, 0x14);
bResult = gsensor_i2c_write_byte(0x15, 0x10);
bResult = gsensor_i2c_write_byte(0x32, 0x02);
bResult = gsensor_i2c_write_byte(0x27, 0x60);
bResult = gsensor_i2c_write_byte(0x28, 0x60);
bResult = gsensor_i2c_write_byte(0x29, 0x60);
bResult = gsensor_i2c_write_byte(0x16, 0x08);
bResult = gsensor_i2c_write_byte(0x19, 0x08);
bResult = gsensor_i2c_write_byte(0x20, 0x00); // 低電平或者下降沿觸發(fā)
//bResult = gsensor_i2c_write_byte(0x20, 0x05);// 高電平或者上升沿觸發(fā)
bResult = gsensor_i2c_write_byte(0x11, 0x80);
固定4步來一個中斷,停止走路時再來一個中斷,靈敏度是10寄存器
|
|