public class GpioLEDComponent extends LEDBase
listeners| Constructor and Description |
|---|
GpioLEDComponent(GpioPinDigitalOutput pin)
default constructor; using this constructor assumes that:
(1) a pin state of HIGH is LIGHT ON
(2) a pin state of LOW is LIGHT OFF
|
GpioLEDComponent(GpioPinDigitalOutput pin,
PinState onState,
PinState offState)
using this constructor requires that the consumer
define the LIGHT ON and LIGHT OFF pin states
|
| Modifier and Type | Method and Description |
|---|---|
Future<?> |
blink(long delay) |
Future<?> |
blink(long delay,
long duration) |
boolean |
isOn()
Return the current power state based on the
GPIO digital output pin state.
|
void |
off()
Set the current GPIO digital output pin state
based for LIGHT OFF
|
void |
on()
Set the current GPIO digital output pin state
based for LIGHT ON
|
Future<?> |
pulse(long duration) |
Future<?> |
pulse(long duration,
boolean blocking) |
addListener, isOff, notifyListeners, removeListener, toggleaddListener, removeAllListeners, removeListenerclearProperties, getName, getProperties, getProperty, getProperty, getTag, hasProperty, removeProperty, setName, setProperty, setTagclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitremoveAllListenersclearProperties, getName, getProperties, getProperty, getProperty, getTag, hasProperty, removeProperty, setName, setProperty, setTagpublic GpioLEDComponent(GpioPinDigitalOutput pin, PinState onState, PinState offState)
pin - GPIO digital output pinonState - pin state to set when power is ONoffState - pin state to set when power is OFFpublic GpioLEDComponent(GpioPinDigitalOutput pin)
pin - GPIO digital output pinpublic void on()
public void off()
public boolean isOn()
public Future<?> blink(long delay)
public Future<?> blink(long delay, long duration)
public Future<?> pulse(long duration)
public Future<?> pulse(long duration, boolean blocking)
Copyright © 2012-2013 Pi4J. All Rights Reserved.