Processing, 類LED
中的brightness()
用法介紹。
用法
.brightness(bright)
參數
bright
(float)
0.0(關閉)到 1.0(最大值)
返回
void
說明
設置亮度
例子
import processing.io.*;
LED greenLed;
boolean ledOn = false;
void setup() {
// the green LED is led0 on the Raspberry Pi
greenLed = new LED("led0");
frameRate(0.5);
}
void draw() {
ledOn = !ledOn;
if (ledOn) {
greenLed.brightness(1.0);
} else {
greenLed.brightness(0.0);
}
}
相關用法
- Processing LED.close()用法及代碼示例
- Processing LED.list()用法及代碼示例
- Processing LED用法及代碼示例
- Processing LowPass用法及代碼示例
- Processing LowPass.freq()用法及代碼示例
- Processing FFT用法及代碼示例
- Processing SawOsc.pan()用法及代碼示例
- Processing FloatDict用法及代碼示例
- Processing FFT.stop()用法及代碼示例
- Processing join()用法及代碼示例
- Processing () (parentheses)用法及代碼示例
- Processing Pulse用法及代碼示例
- Processing PShader用法及代碼示例
- Processing PVector.set()用法及代碼示例
- Processing FloatDict.sortKeysReverse()用法及代碼示例
- Processing texture()用法及代碼示例
- Processing IntDict.add()用法及代碼示例
- Processing PShape.enableStyle()用法及代碼示例
- Processing FloatDict.sub()用法及代碼示例
- Processing String用法及代碼示例
- Processing PImage.pixels[]用法及代碼示例
- Processing vertex()用法及代碼示例
- Processing PVector.mag()用法及代碼示例
- Processing thread()用法及代碼示例
- Processing Capture.stop()用法及代碼示例
注:本文由純淨天空篩選整理自processing.org大神的英文原創作品 LED.brightness()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。