Class RgbPwmLed

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

public class RgbPwmLed
extends Object
implements Closeable
Three pin controlled RGB LED.
  • Constructor Details

    • RgbPwmLed

      public RgbPwmLed​(int redPin, int greenPin, int bluePin) throws RuntimeIOException
      Parameters:
      redPin - GPIO for the red LED.
      greenPin - GPIO for the green LED.
      bluePin - GPIO for the blue LED.
      Throws:
      RuntimeIOException - If an I/O error occurred.
    • RgbPwmLed

      public RgbPwmLed​(PwmOutputDeviceFactoryInterface deviceFactory, int redPin, int greenPin, int bluePin) throws RuntimeIOException
      Parameters:
      deviceFactory - Device factory to use to provision this device.
      redPin - GPIO for the red LED.
      greenPin - GPIO for the green LED.
      bluePin - GPIO for the blue LED.
      Throws:
      RuntimeIOException - If an I/O error occurred.
  • Method Details