This reference is for Processing 3.0+. If you have a previous version, use the reference included with your software in the Help menu. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.
| Class | LED |
| Name |
brightness() |
| Examples |
import processing.io.*;
LED greenLed;
boolean ledOn = false;
void setup() {
// the green LED is led0 on the Raspberry Pi
greenLed = new LED(LED.list()[0]);
frameRate(0.5);
}
void draw() {
ledOn = !ledOn;
if (ledOn) {
greenLed.set(1.0);
} else {
greenLed.set(0.0);
}
}
|
| Description |
Sets the brightness
|
| Syntax | .brightness(bright) |
| Parameters |
| bright |
float: 0.0 (off) to 1.0 (maximum) |
|
| Returns | void |
Updated on March 16, 2016 10:39:12am EDT