public class PwmLedBarGraph extends Object implements OutputDeviceInterface, Closeable
Constructor and Description |
---|
PwmLedBarGraph(int... gpios) |
PwmLedBarGraph(List<PwmLed> leds) |
PwmLedBarGraph(PwmLed... leds) |
PwmLedBarGraph(PwmOutputDeviceFactoryInterface deviceFactory,
int... gpios) |
Modifier and Type | Method and Description |
---|---|
void |
blink() |
void |
close() |
float |
getValue()
Get the proportion of LEDs currently lit.
|
void |
off() |
void |
on() |
void |
pulse(float fadeTime,
int steps,
int iterations) |
void |
setValue(float newValue)
Light a proportion of the LEDs using value as a percentage.
|
void |
toggle() |
public PwmLedBarGraph(int... gpios)
public PwmLedBarGraph(PwmOutputDeviceFactoryInterface deviceFactory, int... gpios)
public PwmLedBarGraph(PwmLed... leds)
public void on()
public void off()
public void toggle()
public void blink()
public void pulse(float fadeTime, int steps, int iterations)
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.