Emakefun Gesture Recognizer 2.0
载入中...
搜索中...
未找到
Public 类型 | Public 成员函数 | 静态 Public 属性 | 所有成员列表
emakefun::GestureRecognizer类 参考

手势识别传感器 更多...

#include <gesture_recognizer.h>

Public 类型

enum  Gesture : uint8_t {
  kGestureNone = 0x0 , kGestureRightSwipe = 0x01 , kGestureLeftSwipe = 0x02 , kGestureBackwardSwipe = 0x03 ,
  kGestureForwardSwipe = 0x04 , kGestureUpward = 0x05 , kGestureDownward = 0x06 , kGestureExited = 0x07 ,
  kGestureHover = 0x08
}
 手势类型 更多...
 

Public 成员函数

 GestureRecognizer (const uint8_t i2c_address=kDefaultI2cAddress)
 构造函数
 
int32_t Initialize (TwoWire *const wire)
 
Gesture GetGesture ()
 获取识别到的手势
 

静态 Public 属性

static constexpr uint8_t kDefaultI2cAddress = 0x39
 手势识别传感器默认I2C地址
 

详细描述

手势识别传感器

示例
get_gesture.ino.

成员枚举类型说明

◆ Gesture

手势类型

枚举值
kGestureNone 

0x00: 无手势动作

kGestureRightSwipe 

0x01: 右移动作

kGestureLeftSwipe 

0x02: 左移动作

kGestureBackwardSwipe 

0x03: 后移动作

kGestureForwardSwipe 

0x04: 前移动作

kGestureUpward 

0x05: 上拉动作

kGestureDownward 

0x06: 下压动作

kGestureExited 

0x07: 离开感应区

kGestureHover 

0x08: 悬停

构造及析构函数说明

◆ GestureRecognizer()

emakefun::GestureRecognizer::GestureRecognizer ( const uint8_t  i2c_address = kDefaultI2cAddress)

构造函数

参数
[in]i2c_address手势识别传感器I2C地址,默认值为0x39

成员函数说明

◆ GetGesture()

GestureRecognizer::Gesture emakefun::GestureRecognizer::GetGesture ( )

获取识别到的手势

返回
手势类型,参考枚举: GestureRecognizer::Gesture

类成员变量说明

◆ kDefaultI2cAddress

constexpr uint8_t emakefun::GestureRecognizer::kDefaultI2cAddress = 0x39
staticconstexpr

手势识别传感器默认I2C地址

0x39: 默认I2C地址

示例
get_gesture.ino.

该类的文档由以下文件生成: