摘要
设计了一种基于STC单片机的挥手速度测量装置。本装置有两个反射式红外传感器,当手经过传感器时,手的位置信息变成电压信号触发STC单片机的两路外部中断、实现计时;再根据两个反射式红外传感器之间的距离和手经过的时间差,计算出挥手平均速度,并通过LED数码管显示出来。实验表明,该测试装置具有简单可靠,成本低,使用方便等优点。
A device based on STC microcomputer is developed for wave speed measure.This device has two reflective infrared sensors,it gets time span by transforming hand position signal into voltage signal to triggering two external interrupts of STC microcomputer when the hand waves through two photoelectric sensors.Then the STC microcomputer can calculate wave average speed measure according to the distance between two reflective infrared sensors and the time span of waving through two reflective infrared sensors,and then display on LED digital tubes.Experiments show that the testing device has advantages of simple and reliable operation,low cost,easy to use.
出处
《光学仪器》
2014年第3期279-282,共4页
Optical Instruments
关键词
单片机
外部中断
挥手速度
microcomputer
external interrupt
wave speed