1 Star 0 Fork 0

DFRobot / DFRobot_VL53L0X

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

DFRobot_VL53L0X

VL53L0X激光测距传感器是一款基于意法半导体(STMicroelectronics)新出的基于飞行时间测距 (ToF) 原理设计的高精度测距传感器。与传统的技术不同,VL53L0X无论目标反射率如何,都能提供精确的距离测量,最高测量距离2米。

产品效果图产品效果图

Product Link(https://www.dfrobot.com.cn/goods-1643.html

SKU: SEN0245

Table of Contents

概述

该库提供 VL53L0X 激光测距仪 API 函数。

库安装

使用此库前,请首先下载库文件,将其粘贴到\Arduino\libraries目录中,然后打开examples文件夹并在该文件夹中运行演示。

方法

  /**
   * @fn DFRobot_VL53L0X
   * @brief DFRobot_VL53L0X构造函数
   */
  DFRobot_VL53L0X();
  ~DFRobot_VL53L0X();
  /**
   * @fn begin
   * @brief 初始化传感器,并设置其I2C地址.
   * @param addr 7位I2C地址,范围:1~127
   * @return 无
   */
  void begin(uint8_t addr = VL53L0X_DEF_I2C_ADDR);	
  /**
   * @fn setMode
   * @brief 设置VL53L0X 传感器的工作模式。.
   * @param mode 测量模式
   * @n     eSingle      单次测量模式
   * @n     eContinuous  连续测量模式
   * @param precision 设置测量精度
   * @n     eHigh  高精度(0.25mm)
   * @n     eLow   低精度(1mm)
   * @return 无
   */
  void setMode(eModeState mode, ePrecisionState precision);
  /**
   * @fn start
   * @brief 开始测量.
   */
  void start();
  /**
   * @fn stop
   * @brief 停止测量.
   */
  void stop();
  /**
   * @fn getDistance
   * @brief 获取测来测量数据,单位: mm.
   * @return 测量数据
   */
  float getDistance();
  /**
   * @fn getAmbientCount
   * @brief 获取环境量.
   * @return 环境量.
   */
  uint16_t getAmbientCount();
  /**
   * @fn getSignalCount
   * @brief 获取信号数.
   * @return 信号数.
   */
  uint16_t getSignalCount();
  /**
   * @fn getStatus
   * @brief 获取状态标志.
   * @return 状态标志.
   */
  uint8_t getStatus();

兼容性

MCU Work Well Work Wrong Untested Remarks
FireBeetle-ESP32
FireBeetle-ESP8266
FireBeetle-BLE4.1

历史

  • 2017/08/21 - 1.0.0 版本

创作者

Written by lixin(xin.li@dfrobot.com), 2017. (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.

简介

暂无描述 展开 收起
C++
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/dfrobot/DFRobot_VL53L0X.git
git@gitee.com:dfrobot/DFRobot_VL53L0X.git
dfrobot
DFRobot_VL53L0X
DFRobot_VL53L0X
master

搜索帮助

14c37bed 8189591 565d56ea 8189591