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 | |||
|---|---|---|---|
| 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("led0");
frameRate(0.5);
}
void draw() {
ledOn = !ledOn;
if (ledOn) {
greenLed.brightness(1.0);
} else {
greenLed.brightness(0.0);
}
}
| ||
| Description | Sets the brightness | ||
| Syntax | .brightness(bright) | ||
| Parameters |
| ||
| Returns | void |

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.