找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2737|回复: 0
打印 上一主题 下一主题
收起左侧

QMA6981计步器配置

[复制链接]
跳转到指定楼层
楼主
ID:366097 发表于 2018-7-6 21:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
  固定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寄存器

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 顶 踩
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表