Class RgbPwmLed

java.lang.Object
com.diozero.devices.RgbPwmLed
All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable

public class RgbPwmLed
extends java.lang.Object
implements java.io.Closeable
Three pin controlled RGB LED.
  • Constructor Summary

    Constructors 
    Constructor Description
    RgbPwmLed​(int redPin, int greenPin, int bluePin)  
    RgbPwmLed​(PwmOutputDeviceFactoryInterface deviceFactory, int redPin, int greenPin, int bluePin)  
  • Method Summary

    Modifier and Type Method Description
    void close()  
    float[] getValues()
    Get the value of all LEDs.
    void off()
    Turn all LEDs off.
    void on()
    Turn all LEDs on.
    void setValues​(float red, float green, float blue)
    Set the value of all LEDs.
    void toggle()
    Toggle the state of all LEDs.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait