匿名
未登录
登录
丢石头百科
搜索
查看“PAJ7620U2 Gesture Sensor”的源代码
来自丢石头百科
名字空间
页面
讨论
更多
更多
页面选项
查看
查看源代码
历史
←
PAJ7620U2 Gesture Sensor
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
<div class="tabber"> {{外围模块|colorscheme=blue |name = PAJ7620U2 Gesture Sensor |img=[[File:PAJ7620U2-Gesture-Sensor-intro.jpg|360px |alt=PAJ7620U2-Gesture-Sensor|link=https://{{SERVERNAME}}/shop/PAJ7620U2-Gesture-Sensor.htm | PAJ7620U2 Gesture Sensor]] |category1=手势识别 |brand=Waveshare |feature = PAJ7620U2手势识别传感器 | interface1 =I2C }} <div class="tabbertab" title="说明"> =产品概述= PAJ7620U2 Gesture Sensor是一款基于PAJ7620U2的手势识别模块,可直接识别9种基本手势,支持I2C接口,兼容3.3V/5V电平。 ==特点== *基于PAJ7620U2传感器,可直接识别9种基本手势,支持手势中断输出 *内置红外LED和光学镜头,能在低光和黑暗环境下工作 *支持I2C接口通信,仅需两根信号脚即可控制 *板载电平转换电路,可兼容3.3V/5V的逻辑电平 *提供完善的配套资料手册(Raspberry/Arduino/STM32示例程序和用户手册等) ==产品参数== *工作电压:3.3V/5V *通信接口:I2C *识别距离:5CM ~ 15CM *识别手势:上、下、左、右、前、后、顺时针、逆时针、摇摆 *识别速度:240HZ *识别视角:60° (对角线) *环境光免疫力:<100K LUX *产品尺寸:20MM × 20MM *过孔直径:2.0MM *应用场景:智能家居、办公室和教学;机器人交互、手势玩具、体感游戏装备 ==接口说明== *引脚功能 {|border=2; style="width:800px;" |-style="background:#000088; color:white;" align="center" |引脚号||标识||管脚描述 |-align="center" |width="100px"|1 |VCC||3.3V/5V电源正 |-align="center" |2||GND||电源地 |-align="center" |3||SDA||I2C数据线 |-align="center" |4||SCL||I2C时钟线 |-align="center" |5||INT||外部中断引脚 |-align="center" |}<br /> =产品使用= ==示例程序== 在演示例程中STM32与Arduino例是程通过串口输出手势识别数据,默认波特率为115200(注:可通过修改代码配置下位机通信波特率),如通过串口调试助手调试时,需正确配置好波特率。 ===官方例程下载=== 1.在官网上找到对应产品,在产品资料打开下载路径,在wiki中下载示例程序:<br /> [[File:PJA7062-1.png|800px]]<br/> <br/> 2.得到解压包,解压得到如下文件:<br /> [[File:PAJ760U2-2.png|800px]]<br/> Arduino::基于Arduino UNO例程。<br /> STM32:基于STM32F103RBT6的HAL库例程。<br /> RaspberryPi: 树莓派例程,包括bcm2835、wiringPi和Python。<br /> 每个平台都含有两个检测例程:<br /> [[File:PJA7620-3.png|800px]]<br/> <br/> ==树莓派程序演示== ===复制到树莓派=== 1.将SD卡插入到电脑,电脑会识别到一个BOOT的移动盘<br /> [[File:PAJ-4.png|800px]]<br/> <br /> 2.将解压文件中RaspberryPi文件夹复制到boot根目录下<br /> [[File:pAJ.png|800px]]<br/><br /> 3.弹出U盘,将SD卡插入树莓派中,然后上电,查看/boot目录<br /> [[File:PAJ-6.png|800px]]<br/><br /> 4.将程序复制到用户目录下,并修改用户权限<br/> <pre> sudo cp -r /boot/RaspberryPi/ ./ sudo chmod 777 -R RaspberryPi/ </pre> [[File:PAJ-8(4).png|900px]]<br /> <pre> cd RaspberryPi </pre> [[File:PAJ-9.png|800px]]<br /> ===安装库函数=== 需要安装必要的函数库(wiringPi、bcm2835、python库),否则以下的示例程序可能无法正常工作。<br /> *安装BCM2835库:<br /> http://www.airspayce.com/mikem/bcm2835/ <br /> *进入BCM2835的官网下载并把安装包复制到树莓派上,运行如下:<br /> <pre> sudo tar zxvf bcm2835-1.xx.tar.gz cd bcm2835-1.xx sudo ./configure sudo make sudo make check sudo make install </pre> 其中xx代表的是下载的版本号,例如我下载的bcm2835-1.52, 那么就应该执行:sudo tar zxvf '''bcm2835-1.52.tar.gz'''。 *安装wiringPi库:<br /> <pre> sudo apt-get install git sudo git clone git://git.drogon.net/wiringPi cd wiringPi sudo ./build </pre> *安装python库: <pre> sudo apt-get install python-pip sudo pip install RPi.GPIO sudo pip install spidev sudo apt-get install python-imaging sudo apt-get install python-smbus sudo apt-get install python-serial </pre> ===打开树莓派I2C接口 === <pre> sudo raspi-config </pre> *进入设置-选择 5.Interfacing Options(接口选项)<br /> [[File:PAJ10.png|800px]]<br /> *选择I2C<br /> [[File:PAJ11.png|800px]]<br /> *选择是确认启动I2C接口<br /> [[File:PAJ12.png|800px]]<br /> ===硬件连接=== *配送的排线颜色可能跟下图不一致,在连接模块的时候注意对照丝印连接<br /> [[File:PAJ hardware connection16.png|900px]]<br /> {|border=2; style="width:800px;" |-style="background:#008080; color:white;" align="center" |Gesture Sensor||Raspberry PI(Board)||Raspberry Pi(BCM) |-align="center" |VCC||5V||5 |-align="center" |GND||GND||GND |-align="center" |SDA||3||SPIP2 |-align="center" |style="width:300px"|SCL||style="width:300px;"|5||style="width:300px"|P3 |} *在RaspberryPi目录下,进入对应的目录下运行;<br /> [[File:program compilation and operation17.png|900px]]<br /> Bcm2835、wiringPi、Python均含两个例程<br /> [[File:program compliation and operation18.png|900px]]<br /> *bcm2835程序:<br /> <pre> cd bcm2835 cd Gesture make sudo ./PAJ7620U2 </pre> {|border=0; style="width:900px;font-size:12px;" |- |cd bcm2835||为进入程序目录(注:目录位置为用户所放例程的位置) |- |cd Gesture ||进入9种手势检测例程(注:如果接近检测例程为 cd PS) |- |make||编译程序 |- |sudo ./PAJ7620U2||运行例程 |} *wiringPi程序:<br /> <pre> cd wiringPi cd Gesture make sudo ./PAJ7620U2 </pre> {|border=0; style="width:900px;font-size:12px;" |- |cd wiringPi||为进入程序目录(注:目录位置为用户所放例程的位置) |- |cd Gesture ||进入9种手势检测例程(注:如果接近检测例程为 cd PS) |- |make||编译程序 |- |sudo ./PAJ7620U2||运行例程 |} *Python程序:<br /> <pre> Python程序: cd python cd Gesture sudo python PAJ7620U2.py </pre> ===程序效果=== *9种手势检测流程:<br /> [[File:program effect18.png|900px]]<br /> *接近检测例程:<br /> [[File:program effect 2.png|900px]]<br /> ==STM32程序演示== 本例程使用的开发板为 XNUCLEO-F103RB,芯片为STM32F103RBT6,程序是基于HAL库。<br/> ===硬件连接=== *将模块连接到XNUCLEO开发板,同时连接XNUCLEO开发板的USB to UART接口到电脑。<br/> {|border=2; style="width:800px;" |-style="background:#00ffff; color:black;" align="center" |Gesture Sensor||STM32 |-align="center" |VCC||3.3/5V |-align="center" |GND||GND |-align="center" |SDA||PB9 |-align="center" |style="width:400px"|SCL||style="width:400px;"|PB8 |} ===程序编译与下载=== [[File:STM-1.png|800px]]<br /> <br /> ===程序效果=== *打开串口助手,设置波特率为115200<br /> *9种手势检测例程:<br /> [[File:stm-2.png|800px]]<br /> *接近检测里程:<br /> [[File:stm-3.png|800px]]<br /> <br /> ==Arduino程序演示== 本例程使用的开发板为UNO PLUS兼容Arduino UNO<br /> ===硬件连接=== {|border=2; style="width:800px;" |-style="background:#00ffff; color:black;" align="center" |Gesture Sensor||Arduino |-align="center" |VCC||5V |-align="center" |GND||GND |-align="center" |SDA||27 |-align="center" |style="width:400px"|SCL||style="width:400px;"|28 |} ===程序编译与上传=== [[File:PAJ7620u2-16.png|800px]]<br /> ===程序效果=== *9种手势检测例程:<br /> [[File:PAJ7620u2-17.png|800px]]<br /> *接近检测例程:<br /> [[File:PAJ7620U2-19.png|800px]]<br /> </div> <div class="tabbertab" title="资料"> ===文档=== *[https://{{SERVERNAME}}/w/upload/2/22/PAJ7620U2-Gesture-Sensor-user-manual-cn.pdf 用户手册] *[https://{{SERVERNAME}}/w/upload/4/46/PAJ7620U2-Gesture-Sensor-Schematic.pdf 原理图] ===程序=== *[https://{{SERVERNAME}}/w/upload/7/71/PAJ7620U2-Gesture-Sensor-Demo-Code.7z 示例程序] ===软件=== *[https://www.arduino.cc/en/Main/Software Arduino IDE] *[https://{{SERVERNAME}}/w/upload/5/5f/Sscom.7z 串口调试助手] ===相关资料=== *[https://{{SERVERNAME}}/w/upload/1/15/PAJ7620U2_GDS-R1.0_29032016_41002AEN.pdf PAJ7620U2数据手册] </div> == FAQ == <div class="tabbertab" title="FAQ"><br /> </div> <div class="tabbertab" title="售后"><br />{{eng24}}</div>
该页面使用的模板:
模板:Eng24
(
查看源代码
)
模板:Service00
(
查看源代码
)
模板:Tipbox
(
查看源代码
)
模板:外围模块
(
查看源代码
)
返回至
PAJ7620U2 Gesture Sensor
。
导航
导航
首页
最近更改
随机页面
MediaWiki帮助
首页
首页
树莓派
主机
配件包
外壳
键鼠
电源
扩展板
显示屏
墨水屏
摄像模块
通信模块
继电器
电机驱动板
游戏机
产品分类
树莓派
Arduino
micro:bit
STM32
Espressif
WiFi模块
蓝牙模块
无线模块
LoRa模块
4G模块
GSM
GPRS
以太网
导航模块
北斗卫星
GPS
LCD
墨水屏
OLED
摄像头
USB模块
串口模块
RS232
RS485
CAN
传感器
温度模块
湿度模块
气压模块
继电器
电机模块
指纹模块
电平转换
音频模块
编程器
Wiki工具
Wiki工具
特殊页面
页面工具
页面工具
用户页面工具
更多
链入页面
相关更改
页面信息
页面日志