——来自迪文开发者论坛
本期为大家推送迪文开发者论坛获奖开源案例——隔空手势识别测试系统。工程师采用7英寸COF智能屏,通过T5L OS核与PAJ7620U2手势识别传感器进行数据交互,不需要使用任何按键,只需将手贴近传感器即可进入菜单系统控制屏幕,实现上、下、左、右、贴近、远离、左旋转、右旋转、挥手9种手势效果。不一样的屏幕交互体验,推荐大家前来观看!
UI素材展示
UI开发示例
C51代码设计 T5L OS核与PAJ7620U2手势识别传感器进行数据交互,检测当前的手势,判断当前显示的图片和翻页显示的图片,实现利用手势来切换页面的功能。参考代码如下:
void select_operate(uint16_t gesrure_value){ if(gesrure_value == GES_UP) //上 { if(select_value >= 2) { select_value -= 2; } dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, select_pos[select_value][0], select_pos[select_value][1]); } else if(gesrure_value == GES_DOWN) //下 { if(select_value <= 1) { select_value += 2; } dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, select_pos[select_value][0], select_pos[select_value][1]); } else if(gesrure_value == GES_LEFT) //左 { if(select_value % 2 == 1) { select_value -= 1; } dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, select_pos[select_value][0], select_pos[select_value][1]); } else if(gesrure_value == GES_RIGHT) //右 { if(select_value % 2 == 0) { select_value += 1; } dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, select_pos[select_value][0], select_pos[select_value][1]); }}
void turning_operate(uint16_t gesrure_value){ uint16_t i = 0; uint8_t turning_mode = 0; //翻页模式,0上,1下,2左,3右 uint16_t turning_count = 0; //翻页最终次数 if(gesrure_value == GES_UP || gesrure_value == GES_DOWN || gesrure_value == GES_LEFT || gesrure_value == GES_RIGHT) { if(gesrure_value == GES_UP) //上 { turning_mode = 0; turning_count = 48; } else if(gesrure_value == GES_DOWN) //下 { turning_mode = 1; turning_count = 48; } else if(gesrure_value == GES_LEFT) //左 { turning_mode = 2; turning_count = 80; } else if(gesrure_value == GES_RIGHT) //右 { turning_mode = 3; turning_count = 80; } if(turning_current_image == 0 || turning_current_image == 2) { turning_current_image = 1; } else { turning_current_image = 2; } for(i = 0;i <= turning_count;i++) { switch(turning_mode) { case 0: dgus_show_variate_icon_location_set(turning_current_image * 0x100 + 0x2000, 0, 480 - i * 10); t5l0_sys_delay_ms(20); if(turning_last_image != 0) { dgus_show_variate_icon_location_set(turning_last_image * 0x100 + 0x2000, 0, 0 - i * 10); } break; case 1: dgus_show_variate_icon_location_set(turning_current_image * 0x100 + 0x2000, 0, -480 + i * 10); t5l0_sys_delay_ms(20); if(turning_last_image != 0) { dgus_show_variate_icon_location_set(turning_last_image * 0x100 + 0x2000, 0, 0 + i * 10); } break; case 2: dgus_show_variate_icon_location_set(turning_current_image * 0x100 + 0x2000, 800 - i * 10, 0); t5l0_sys_delay_ms(20); if(turning_last_image != 0) { dgus_show_variate_icon_location_set(turning_last_image * 0x100 + 0x2000, 0 - i * 10, 0); } break; case 3: dgus_show_variate_icon_location_set(turning_current_image * 0x100 + 0x2000, -800 + i * 10, 0); t5l0_sys_delay_ms(20); if(turning_last_image != 0) { dgus_show_variate_icon_location_set(turning_last_image * 0x100 + 0x2000, 0 + i * 10, 0); } break; } t5l0_sys_delay_ms(20); } turning_last_image = turning_current_image; }}
-
测试系统
+关注
关注
6文章
872浏览量
63004 -
开源
+关注
关注
3文章
3758浏览量
44009 -
智能屏幕
+关注
关注
0文章
72浏览量
3677
发布评论请先 登录
【开源获奖案例】AI智能交互新方案:基于T5L智能屏的AI DeepSeek大模型

【开源获奖案例】基于T5L智能屏的音乐播放与歌词显示方案

【开源获奖案例】基于T5L智能屏的零食机

最具影响力开源创新贡献奖!RT-Thread睿赛德再获殊荣

【开源获奖案例】基于T5L智能屏的FM收音机

【开源获奖案例】基于T5L智能屏的EQ均衡效果器

开源项目 ! 利用边缘计算打造便携式视觉识别系统
如何用OpenCV进行手势识别--基于米尔全志T527开发板

ElfBoard开源项目|车牌识别项目技术文档

Arm加入OpenCloudOS操作系统开源社区
Cortex-A55国产处理器_教学实验箱_操作案例分享:5-21 手势识别实验
【开源获奖案例】基于T5L智能屏的汽车抬头显示器方案

评论