1 Star 1 Fork 0

DFRobot/DFRobot_BMX160

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

DFRobot_BMX160

BMX160是一款高度集成的低功率9轴传感器,可在每个空间方向提供精确的加速度、角速度(陀螺)和地磁测量 BMX160九轴传感器集成三个传感器:16位陀螺仪、16位加速度、地磁传感器 这个库是针对BMX160传感器,它通过Arduino I2C操作。

产品链接(https://www.dfrobot.com.cn/goods-2947.html)

SKU:SEN0373

目录

概述

提供一个Arduino库,通过I2C通信控制bmx160以获取磁强计加速计、陀螺仪和步进计数器。

库安装

这里提供两种使用本库的方法:

  1. 打开Arduino IDE,在状态栏中的Tools--->Manager Libraries 搜索"DFRobot_VEML6075"并安装本库.
  2. 首先下载库文件,将其粘贴到\Arduino\libraries目录中,然后打开examples文件夹并在该文件夹中运行演示.

方法

    /**
     * @fn begin
     * @brief 初始化iic
     * @return 返回初始化结果
     * @retval true 初始化成功
     * @retval false 初始化失败
     */
    bool begin();

    /**
     * @fn setGyroRange
     * @brief 设置陀螺仪角速率范围和分辨率。
     * @param bits 
     * @n       eGyroRange_2000DPS     2000dps的陀螺仪灵敏度
     * @n       eGyroRange_1000DPS     1000dps的陀螺仪灵敏度
     * @n       eGyroRange_500DPS      500dps的陀螺仪灵敏度
     * @n       eGyroRange_250DPS      250dps的陀螺仪灵敏度
     * @n       eGyroRange_125DPS      125dps的陀螺仪灵敏度
     */
    void setGyroRange(eGyroRange_t bits);

    /**
     * @fn setAccelRange
     * @brief 选择加速计g范围。
     * @param bits 
     * @n       eAccelRange_2G        (1 LSB = 0.000061035mg) 
     * @n       eAccelRange_4G        (1 LSB = 0.000122070mg) 
     * @n       eAccelRange_8G        (1 LSB = 0.000244141mg) 
     * @n       eAccelRange_16G       (1 LSB = 0.000488281mg)
     */
    void setAccelRange(eAccelRange_t bits);
    
    /**
     * @fn getAllData
     * @brief 获取陀螺仪、加速计、地磁计数据
     * @param magn  存储地磁计数据
     * @param gyro  存储陀螺仪数据
     * @param accel  存储加速计数据
     */
    void getAllData( sBmx160SensorData_t *magn,  sBmx160SensorData_t *gyro,  sBmx160SensorData_t *accel);

    /**
     * @fn softReset
     * @brief 重启传感器
     * @return 重启结果
     * @retval true 设置重启成功
     * @retval false 设置重启失败
     */
    bool softReset();

    /**
     * @fn setLowPower
     * @brief 禁用地磁计、陀螺仪传感器以降低功耗
     */
    void setLowPower();

    /**
     * @fn wakeUp
     * @brief 使能地磁计、陀螺仪传感器
     */
    void wakeUp();

兼容性

主板 通过 未通过 未测试 备注
Arduino uno
Mega2560
Leonardo
ESP32
micro:bit
FireBeetle M0

历史

  • 2021/10/20 - 1.0.1 版本
  • 2019/06/25 - 1.0.0 版本

创作者

Written by yangfeng(feng.yang@dfrobot.com), 2021. (Welcome to our website)

Copyright 2010 DFRobot Co.Ltd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
README
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/dfrobot/DFRobot_BMX160.git
git@gitee.com:dfrobot/DFRobot_BMX160.git
dfrobot
DFRobot_BMX160
DFRobot_BMX160
master

搜索帮助