虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

Wide-input

  • Arduino应用_Arduino连接超声波传感器测距

    超声波传感器适用于对大幅的平面进行静止测距。普通的超声波传感器测距范围大概是 2cm~450cm,分辨率3mm(淘宝卖家说的,笔者测试环境没那么好,个人实测比较稳定的 距离10cm~2m 左右,超过此距离就经常有偶然不准确的情况发生了,当然不排除笔者技术 问题。) 测试对象是淘宝上面最便宜的SRF-04 超声波传感器,有四个脚:5v 电源脚(Vcc),触发控制端(Trig),接收端(Echo),地端(GND) 附:SRF 系列超声波传感器参数比较   模块工作原理: 采用IO 触发测距,给至少10us 的高电平信号; 模块自动发送8个40KHz 的方波,自动检测是否有信号返回; 有信号返回,通过IO 输出一高电平,高电平持续的时间就是超声波从发射到返回的时间.测试距离=(高电平时间*声速(340m/s))/2; 电路连接方法   Arduino 程序例子: constintTrigPin = 2; constintEchoPin = 3; floatcm; voidsetup() { Serial.begin(9600); pinMode(TrigPin, OUTPUT); pinMode(EchoPin, INPUT); } voidloop() { digitalWrite(TrigPin, LOW); //低高低电平发一个短时间脉冲去TrigPin delayMicroseconds(2); digitalWrite(TrigPin, HIGH); delayMicroseconds(10); digitalWrite(TrigPin, LOW); cm = pulseIn(EchoPin, HIGH) / 58.0; //将回波时间换算成cm cm = (int(cm * 100.0)) / 100.0; //保留两位小数 Serial.print(cm); Serial.print("cm"); Serial.println(); delay(1000); }

    标签: Arduino 连接 超声波传感器

    上传时间: 2013-11-01

    上传用户:xiaoyuer

  • Full support for extended regular expressions (those with intersection and complement); Support for

    Full support for extended regular expressions (those with intersection and complement); Support for some kinds of cycles in grammar; DFA-based operation; Unicode support; C++ only, requires a modern compiler; Lexical analyzers can be configured to get symbols from any input class (built-in support for std::istream, std::wistream and FILE *); Designed to work with Whale, but can work standalone or interface to other parsers.

    标签: intersection expressions complement for

    上传时间: 2013-12-11

    上传用户:zhanditian

  • (其中已经包含5个源码)所附源程序C或C++代码文件及其可执行文件 Scs.cpp 基本分类算法源程序

    (其中已经包含5个源码)所附源程序C或C++代码文件及其可执行文件 Scs.cpp 基本分类算法源程序, 输入数据文件cfile.txt,efile.txt,gfile.txt,pfile.txt ,rfile.txt,tfile.txt Sga.c 基本遗传算法源程序, 输入数据文件input,输出文件output A_life.c 基于遗传算法的人工生命模拟源程序, 输入数据文件world GA_nn.c 基于遗传算法优化神经网络结构源程序,输入数据文件sample Patmat.c 基于遗传算法提取基元图形源程序

    标签: Scs cpp 源程序 源码

    上传时间: 2014-01-11

    上传用户:13215175592

  • Tug of War(A tug of war is to be arranged at the local office picnic. For the tug of war, the picnic

    Tug of War(A tug of war is to be arranged at the local office picnic. For the tug of war, the picnickers must be divided into two teams. Each person must be on one team or the other the number of people on the two teams must not differ by more than 1 the total weight of the people on each team should be as nearly equal as possible. The first line of input contains n the number of people at the picnic. n lines follow. The first line gives the weight of person 1 the second the weight of person 2 and so on. Each weight is an integer between 1 and 450. There are at most 100 people at the picnic. Your output will be a single line containing 2 numbers: the total weight of the people on one team, and the total weight of the people on the other team. If these numbers differ, give the lesser first. )

    标签: picnic the tug war

    上传时间: 2014-01-07

    上传用户:离殇

  • The book presents the entire Java programming language and essential parts of the class libraries: t

    The book presents the entire Java programming language and essential parts of the class libraries: the collection classes and the input-output classes.

    标签: programming essential libraries the

    上传时间: 2015-03-02

    上传用户:yulg

  • pdnMesh is an automatic mesh generator and solver for Finite Element problems. It will also do post-

    pdnMesh is an automatic mesh generator and solver for Finite Element problems. It will also do post-processing to generate contour plots and Postscript printouts. GUI support using GTK or MFC (Win32) is available. The problem definition can be done in any form and given to pdnMesh as an input data file. Drawing Exchange Format (DXF) files can be directly imported to pdnmesh. The quality and the coarseness of the mesh can be controlled by giving input parameters.

    标签: automatic generator problems pdnMesh

    上传时间: 2013-12-19

    上传用户:cuibaigao

  • This directory contains code implementing the K-means algorithm. Source codemay be found in KMEANS.C

    This directory contains code implementing the K-means algorithm. Source codemay be found in KMEANS.CPP. Sample data isfound in KM2.DAT. The KMEANSprogram accepts input consisting of vectors and calculates the givennumber of cluster centers using the K-means algorithm. Output isdirected to the screen.

    标签: implementing directory algorithm contains

    上传时间: 2014-01-27

    上传用户:maizezhen

  • 程序存储问题:设有n 个程序{1,2,…, n }要存放在长度为L的磁带上。程序i存放在磁带上的长度是Li

    程序存储问题:设有n 个程序{1,2,…, n }要存放在长度为L的磁带上。程序i存放在磁带上的长度是Li ,1≤i≤n 程序存储问题要求确定这n 个程序在磁带上的一个存储方案,使得能够在磁带上存储尽可能多的程序。 编程任务: 对于给定的n个程序存放在磁带上的长度,编程计算磁带上最多可以存储的程序数。 数据输入:由文件input.txt给出输入数据。第一行是正整数n,表示文件个数。接下来的1 行中,有n 个正整数,表示程序存放在磁带上的长度。 结果输出: input.txt output.txt 6 50 5 2 3 13 8 80 20

    标签: 程序 磁带 长度 程序存储

    上传时间: 2013-12-20

    上传用户:dongqiangqiang

  • 求解tsp问题的模拟退火源码

    求解tsp问题的模拟退火源码,数据文件请仿照文件中的input.txt自行创建

    标签: tsp 模拟退火 源码

    上传时间: 2015-03-17

    上传用户:talenthn

  • This an adaptive receiver for a direct-sequence spread spectrum (DS-SS) system over an AWGN channel.

    This an adaptive receiver for a direct-sequence spread spectrum (DS-SS) system over an AWGN channel. The adaptive receiver block is modified from the LMS adaptive filter block in DSP Blockset. For DS-SS signal reception, the adaptive filter needs to have multi-rate operation. The input sample rate is equal to chip rate and the output is at symbol rate. Two rates are related by PG, processing gain

    标签: direct-sequence adaptive receiver spectrum

    上传时间: 2014-01-16

    上传用户:D&L37