public class LedBarGraph extends Object implements OutputDeviceInterface, Closeable
Constructor and Description |
---|
LedBarGraph(GpioDeviceFactoryInterface deviceFactory,
boolean activeHigh,
int... gpios) |
LedBarGraph(GpioDeviceFactoryInterface deviceFactory,
int... gpios) |
LedBarGraph(int... gpios) |
LedBarGraph(LED... leds) |
LedBarGraph(List<LED> leds) |
Modifier and Type | Method and Description |
---|---|
void |
blink() |
void |
blink(float onTime,
float offTime,
int iterations,
Action stopAction) |
void |
close() |
float |
getValue()
Get the proportion of LEDs currently lit.
|
void |
off() |
void |
on() |
void |
setValue(float newValue)
Light a proportion of the LEDs using value as a percentage.
|
void |
toggle() |
public LedBarGraph(int... gpios)
public LedBarGraph(GpioDeviceFactoryInterface deviceFactory, int... gpios)
public LedBarGraph(GpioDeviceFactoryInterface deviceFactory, boolean activeHigh, int... gpios)
public LedBarGraph(LED... leds)
public void on()
public void off()
public void toggle()
public void blink()
public void blink(float onTime, float offTime, int iterations, Action stopAction)
public float getValue()
public void setValue(float newValue)
setValue
in interface OutputDeviceInterface
newValue
- Proportion of LEDs to light. 0..1 lights from left to right, 0..-1 lights from right to left.public void close() throws RuntimeIOException
close
in interface Closeable
close
in interface AutoCloseable
RuntimeIOException
Copyright © 2016–2017 mattjlewis. All rights reserved.