public interface DigitalOutput extends PinFeature
| Modifier and Type | Method and Description |
|---|---|
void |
applySignal(Signal signal)
Writes a state to the pin.
|
void |
awaitBlinkingStopped()
Halts the current thread until the blinking on the output
has stopped.
|
void |
blinkTimes(int periodLengthMilliseconds,
int times)
This method is used to let the input blink a number of times.
|
Signal |
getAppliedSignal()
Gets the signal that is currently applied to the pin.
|
void |
high()
Applies a high level signal to the pin.
|
boolean |
isBlinking()
Checks if this output is currently blinking.
|
boolean |
isHigh()
Queries if the signal on the pin
is currently high.
|
boolean |
isLow()
Queries if the signal on the pin
is currently low.
|
void |
low()
Applies a low level signal to the pin.
|
void |
startBlinking(int periodLengthMilliseconds)
This method is used to let the pin blink indefinitely.
|
void |
startBlinking(int periodLengthMilliseconds,
int durationMilliseconds)
This method is used to let the pin blink for a specified
duration.
|
void |
stopBlinking()
Stops any blinking process that is currently in progress on
this output.
|
void |
toggle()
Toggles the current signal on the pin.
|
void |
write(Signal signal)
Writes a state to the pin.
|
activate, blockPin, getName, getPin, isActivatedFeature, isBlocking, isSetup, isTorndownOnShutdown, setTeardownOnShutdown, setup, teardown, unblockPinvoid write(Signal signal)
signal - the signalvoid applySignal(Signal signal)
signal - the signalSignal getAppliedSignal()
void high()
void low()
void toggle()
boolean isHigh()
boolean isLow()
void startBlinking(int periodLengthMilliseconds)
stopBlinking() method.
You can specify the duration of a blinking period.
A blinking period is the full cycle of a state transition
and includes the the high phase as well as the low phase.
Both phases have the same duration.periodLengthMilliseconds - the duration of one full
blinking period in millisecondsvoid startBlinking(int periodLengthMilliseconds,
int durationMilliseconds)
stopBlinking()
method. You can specify the duration of a blinking period.
A blinking period is the full cycle of a state transition
and includes the the high phase as well as the low phase.
Both phases have the same duration.
Also, you can specify the duration of the whole blinking process,
e.g. specify to let the output blink for 3000 milliseconds.periodLengthMilliseconds - the duration of one full
blinking period in millisecondsdurationMilliseconds - the duration of the whole blinking
process in milliseconds. A value of 0
let's it blink indefinitely.void blinkTimes(int periodLengthMilliseconds,
int times)
periodLengthMilliseconds - the duration of one full
blinking period in millisecondstimes - the amount of times the output should blinkvoid stopBlinking()
boolean isBlinking()
void awaitBlinkingStopped()
Copyright © 2015 silverspoon.io. All rights reserved.