“Sensor-Gen&RGB/zh”的版本间的差异
第3行: | 第3行: | ||
|[[File: Microduino-Gen&RGB.jpg|300px|left]] || | |[[File: Microduino-Gen&RGB.jpg|300px|left]] || | ||
::<p style="color: #000000;font-size:200%"><br><br><br><br><br>'''Sensor-Gen&RGB'''</p> | ::<p style="color: #000000;font-size:200%"><br><br><br><br><br>'''Sensor-Gen&RGB'''</p> | ||
− | ::产品编号:'''<big style="color: #00A0A6"> | + | ::产品编号:'''<big style="color: #00A0A6"> </big>''' |
|- | |- | ||
|[[File: Add-to-cart.jpg|300px|left|link=https://shop108263663.taobao.com/?spm=a230r.7195193.1997079397.2.ek3cAW]]|| | |[[File: Add-to-cart.jpg|300px|left|link=https://shop108263663.taobao.com/?spm=a230r.7195193.1997079397.2.ek3cAW]]|| |
2018年5月15日 (二) 06:37的版本
| |
|
技术规格
引脚
编程手册 手势识别
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
if ( gestureSensor.isGestureAvailable() ) {
switch ( gestureSensor.readGesture() ) {
case DIR_UP:
Serial.println("UP");
break;
case DIR_DOWN:
Serial.println("DOWN");
break;
case DIR_LEFT:
Serial.println("LEFT");
break;
case DIR_RIGHT:
Serial.println("RIGHT");
break;
case DIR_NEAR:
Serial.println("NEAR");
break;
case DIR_FAR:
Serial.println("FAR");
break;
default:
Serial.println("NONE");
}
}
}
颜色识别
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// Read the light levels (ambient, red, green, blue)
Serial.print("Ambient: ");
Serial.print(gestureSensor.readAmbientLight());
Serial.print(" Red: ");
Serial.print(gestureSensor.readRedLight());
Serial.print(" Green: ");
Serial.print(gestureSensor.readGreenLight());
Serial.print(" Blue: ");
Serial.println(gestureSensor.readBlueLight());
// Wait 1 second before next reading
delay(1000);
}
文档
注意事项
示例教程
Q&A
历史
图库 |