-
Notifications
You must be signed in to change notification settings - Fork 5
3D_Gesture_Sensor_mini_SKU_SEN0202
The so-called 3D means three-dimensional, three dimensionalities, three coordinates, that is, there is length, width and height, simply say is stereoscopic. The sensor can realize gesture recognition in three-dimensional space. It uses electric near field sensing technology and we can put the sensor into the plastic box to realize gesture recognition and distance induction.
- Working voltage: 3.3 to 5 v
- Interface type: IIC
- Gesture induction: 5 cm
- Distance induction: 10 cm
- Size: 72x54
style="padding: 5px;" | style="padding: 10px;" |
|---------|-----------|----------------------------|
| **Num** | **Label** | **Description** |
| 1 | GND | GND |
| 2 | VCC | VCC(5V) |
| 3 | MCLR | Sensor Reset(Low Level On) |
| 4 | SCL | I2C clock signal |
| 5 | SDA | I2C data signal |
| 6 | D | Digital IO |
||
Sensor address:0X42 |
-
Hardware
- DFRduino UNO x1
- 3D Gesture Sensor mini x1
- Dupont
-
Software
- Arduino IDE Click to download Arduino IDE
Click to download the librarysample and library。how to intall library? Code function: to realize gesture recognition in the direction of the up and down or so and clockwise and counterclockwise circle with fingers.
#include <Gesture.h>
#include <Wire.h>
int testPin= 7;
unsigned char cmd;
Gesture myGesture;
void setup()
{
Wire.begin(); // join i2c bus (address optional for master)
Serial.begin(9600); // start serial for output
pinMode(testPin, INPUT);
Serial.write("3D Gesture sensor is now running....\r\n");
}
void loop()
{
if(digitalRead(testPin)==0)
{
myGesture.I2C1_MasterRead(md.buf,26,0x42); //The address is:0x42
cmd = myGesture.mgcProcMsg(); //process the message
if(cmd != GI_NOGESTURE )
{
switch(cmd)
{
case GI_FLICK_R:
Serial.println("RIGHT");
break;
case GI_FLICK_L:
Serial.println("LEFT");
break;
case GI_FLICK_D:
Serial.println("DOWN");
break;
case GI_FLICK_U:
Serial.println("UP");
break;
case GI_AIRWHEEL_CW://Clockwise in circles
Serial.println("CW");
break;
case GI_AIRWHEEL_CCW://Counterclockwise circles
Serial.println("CCW");
break;
default: break;
}
}
}
else {};
}
When using hand moving up and down or so and clockwise and counterclockwise circle, the serial port output the corresponding string.
More questions or interesting projects, you can Visit the forum To check or post! |
[Schematic] [Layout] [SVG files] shopping from [link dfrobot store] or dfrobot distributor.