[![DOI](https://zenodo.org/badge/7755/jeroendoggen/Arduino-distance-sensor-library.svg)](http://dx.doi.org/10.5281/zenodo.13196)
# Arduino library for distance sensors
The current version provides a unified interface for four sensors:
* SRF04 & SRF05 Ultrasonic Ranger
* Sharp GP2Y0A21YK IR Distance sensor
* Sharp GP2Y0A41SK IR Distance sensor
Code for the individual sensors in also maintained in separate Google code projects. (will be moved to Github soon) (http://code.google.com/u/104098523773938750140/)
## Other Sharp distance sensors:
Currently this library only supports the sensors mentioned above.
If you want to use other distance sensors with this libraries you can do that by adding the appropriate source files.
Have a look at the class diagram below to get an idea of the structure.
Adding an other analog Sharp sensor would mean copy/pasting some of the existing (.cpp & .h) files and changing some parameters in the calculation in the function "getDistanceCentimeter".
You can either derive the parameters from your datasheet or perform a linear regression on experimental data using (1/distance on the X-axis!)
Feel free to fork this project & send me a pull request if you have some correctly working code.
## Folders:
* DistanceSensor: source for the Arduino library
* Documentation: generated with Doxygen (html, Latex)
## Datasheets:
Analog IR Distance sensors:
* [Sharp gp2y0a21yk](https://github.com/jeroendoggen/arduino-distance-sensor-library/raw/master/Documentation/datasheets/Distance_IR_Analog_Sharp_gp2y0a21yk_new.pdf)
* [Sharp gp2y0a41sk0f](https://github.com/jeroendoggen/arduino-distance-sensor-library/raw/master/Documentation/datasheets/Distance_IR_Analog_Sharp_gp2y0a41sk0f.pdf)
Ultrasonic sensors:
* [SRF-04](https://github.com/jeroendoggen/arduino-distance-sensor-library/raw/master/Documentation/datasheets/Distance_Ultrasonic_srf04.pdf)
## Class diagram:
![Class diagram](https://raw.github.com/jeroendoggen/arduino-distance-sensor-library/master/Documentation/html/class_distance_sensor__inherit__graph.png)
没有合适的资源?快使用搜索试试~ 我知道了~
用于距离传感器 的 Arduino 库_Python_代码_相关文件_下载
共211个文件
png:52个
html:49个
js:35个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 1 下载量 152 浏览量
2022-07-14
01:13:54
上传
评论
收藏 2.04MB ZIP 举报
温馨提示
用于距离传感器的 Arduino 库 当前版本为四个传感器提供了统一的接口: SRF04 & SRF05 超声波游侠 夏普 GP2Y0A21YK 红外距离传感器 夏普 GP2Y0A41SK 红外距离传感器 其他夏普距离传感器: 目前这个库只支持上面提到的传感器。如果您想在此库中使用其他距离传感器,您可以通过添加适当的源文件来实现。查看下面的类图以了解结构。 添加其他模拟夏普传感器意味着复制/粘贴一些现有的(.cpp 和 .h)文件并更改函数“getDistanceCentimeter”的计算中的一些参数。您可以从数据表中导出参数,也可以使用(1/X 轴上的距离!)对实验数据执行线性回归 如果您有一些正确工作的代码,请随意分叉这个项目并向我发送拉取请求。 更多详情、使用方法,请下载后细读README.md文件
资源推荐
资源详情
资源评论
收起资源包目录
用于距离传感器 的 Arduino 库_Python_代码_相关文件_下载
(211个子文件)
bcpp_indenter.cfg 309B
AnalogDistanceSensor.cpp 2KB
CombinedDistanceSensors.cpp 1KB
UltrasonicDistanceSensor.cpp 914B
DistanceGP2Y0A41SK.cpp 757B
DistanceSRF04.cpp 717B
DistanceSensor.cpp 701B
DistanceGP2Y0A21YK.cpp 692B
doxygen.css 20KB
search.css 4KB
navtree.css 2KB
tabs.css 1KB
mainpage.dox 334B
Doxyfile 73KB
.gitignore 29B
CombinedDistanceSensors.h 954B
DistanceSensor.h 822B
AnalogDistanceSensor.h 707B
UltrasonicDistanceSensor.h 641B
DistanceSRF04.h 469B
DistanceGP2Y0A21YK.h 455B
DistanceGP2Y0A41SK.h 455B
class_distance_s_r_f04.html 16KB
class_distance_g_p2_y0_a41_s_k.html 16KB
class_distance_g_p2_y0_a21_y_k.html 16KB
_analog_distance_sensor_8h_source.html 15KB
_distance_g_p2_y0_a41_s_k_8h_source.html 15KB
class_analog_distance_sensor.html 14KB
_distance_s_r_f04_8h_source.html 14KB
_distance_sensor_8h_source.html 14KB
class_ultrasonic_distance_sensor.html 14KB
_ultrasonic_distance_sensor_8h_source.html 13KB
_distance_g_p2_y0_a21_y_k_8h_source.html 11KB
class_distance_sensor.html 9KB
class_distance_g_p2_y0_a41_s_k-members.html 9KB
class_distance_g_p2_y0_a21_y_k-members.html 9KB
graph_legend.html 9KB
class_distance_s_r_f04-members.html 9KB
class_ultrasonic_distance_sensor-members.html 8KB
dir_6dde59ad95b5166d5e65261f32edc45c.html 8KB
class_analog_distance_sensor-members.html 8KB
hierarchy.html 8KB
functions.html 8KB
functions_func.html 7KB
files.html 7KB
annotated.html 7KB
classes.html 7KB
class_distance_sensor-members.html 6KB
inherits.html 6KB
doxygeninfo_8h_source.html 5KB
index.html 5KB
functions_61.html 970B
functions_73.html 970B
functions_69.html 970B
functions_67.html 970B
functions_62.html 970B
functions_64.html 970B
classes_61.html 968B
classes_64.html 968B
classes_75.html 968B
pages_61.html 966B
pages_6d.html 966B
all_62.html 964B
all_61.html 964B
all_75.html 964B
all_64.html 964B
all_67.html 964B
all_73.html 964B
all_69.html 964B
all_6d.html 964B
nomatches.html 461B
Centimeter.ino 1KB
Centimeter.ino 646B
Centimeter.ino 332B
Centimeter.ino 332B
Centimeter.ino 321B
jquery.js 123KB
search.js 22KB
navtree.js 14KB
navtreeindex0.js 3KB
resize.js 3KB
dynsections.js 2KB
functions_67.js 1023B
all_67.js 1023B
all_64.js 770B
class_ultrasonic_distance_sensor.js 770B
class_analog_distance_sensor.js 745B
annotated.js 602B
all_62.js 534B
functions_62.js 534B
dir_6dde59ad95b5166d5e65261f32edc45c.js 520B
hierarchy.js 477B
functions_64.js 444B
class_distance_sensor.js 396B
all_61.js 379B
classes_64.js 373B
functions_73.js 285B
all_73.js 285B
class_distance_g_p2_y0_a21_y_k.js 261B
class_distance_g_p2_y0_a41_s_k.js 261B
共 211 条
- 1
- 2
- 3
资源评论
- jian4567892023-03-25资源内容详实,描述详尽,解决了我的问题,受益匪浅,学到了。
快撑死的鱼
- 粉丝: 1w+
- 资源: 9157
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功