标题: QMA6981计步器配置 [打印本页]

作者: yongwow    时间: 2018-7-6 21:08
标题: QMA6981计步器配置
  固定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); // 低电平或者下降沿触发
        //bResult = gsensor_i2c_write_byte(0x20, 0x05);// 高电平或者上升沿触发       

        bResult = gsensor_i2c_write_byte(0x11, 0x80);
       
       
        固定4步来一个中断,停止走路时再来一个中断,灵敏度是10寄存器






欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1