“GestureSenso.readBlueLight()”的版本间的差异

来自Microduino Wikipedia
跳转至: 导航搜索
(创建页面,内容为“{| style="width: 800px;" |- | <p style="color: #666666;font-size:220%">'''GestureSensor.readBlueLight()'''</p> <br> <p style="color: #E87E05;font-size:135%">描述</…”)
 
 
第59行: 第59行:
 
*[[gestureSensor.readAmbientLight()|readAmbientLight()]]
 
*[[gestureSensor.readAmbientLight()|readAmbientLight()]]
 
*[[gestureSensor.readGreenLight()|readGreenLight()]]
 
*[[gestureSensor.readGreenLight()|readGreenLight()]]
*[[gestureSenso.readRedLight()|readRedLight]]
+
*[[gestureSensor.readRedLight()|readRedLight()]]
 
*[[gestureSenso.readProximity()|readProximity()]]
 
*[[gestureSenso.readProximity()|readProximity()]]
 
*[[gestureSenso.readGesture() |readGesture()]]
 
*[[gestureSenso.readGesture() |readGesture()]]
 
|}
 
|}

2018年5月16日 (三) 08:23的最新版本

GestureSensor.readBlueLight()


描述

读取颜色的蓝色通道亮度

参数

返回值

蓝色通道亮度

示例

#include <Microduino_Gesture.h>
// Global Variables
Gesture gestureSensor;


void setup() {

  // Initialize Serial port
  Serial.begin(9600);

  // Initialize Gesture (configure I2C and initial values)
  if ( gestureSensor.begin() ) {
    Serial.println(F("Gesture initialization complete"));
  } else {
    Serial.println(F("Something went wrong during Gesture init!"));
  }

  // Start running the Gesture light sensor (no interrupts)
  if ( gestureSensor.enableLightSensor(false) ) {
    Serial.println(F("Light sensor is now running"));
  } else {
    Serial.println(F("Something went wrong during light sensor init!"));
  }

  // Wait for initialization and calibration to finish
  delay(500);
}

void loop() {
  // Read the light levels (red)
  Serial.print(" Blue: ");
  Serial.print(gestureSensor.readBlueLight());

  // Wait 1 second before next reading
  delay(1000);
}

其他