|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Button
A Button detects press and release events.
Action verbs are read, press, release, and change.
read
gets the current state of the
button
: true is pressed, false is released.
press
waits until the button transitions
from released to pressed.
release
waits until the button transitions from pressed to
released.
change
waits until the button state changes.
getTime
returns the time when the event occurred.
Field Summary |
---|
Fields inherited from interface com.sentilla.system.Action |
---|
DONE, ERROR, IDLE, PENDING |
Method Summary | |
---|---|
void |
change()
Returns when the state of the user button changes. |
int |
getId()
Returns digital pin ID. |
int |
getTime()
Returns the time of a state transition. |
boolean |
getValue()
Returns true if digital pin value is set. |
void |
press()
Returns when the user button transitions from released to pressed. |
boolean |
read()
Returns true if the user button is pressed. |
void |
release()
Returns when the user button transitions from pressed to released. |
Button |
setChange()
Sets the button to await a state transition. |
Button |
setPress()
Sets the button to await transition from released to pressed. |
Button |
setRead()
Sets the button to read the button state. |
Button |
setRelease()
Sets the button to await transition from pressed to released. |
Methods inherited from interface com.sentilla.system.Action |
---|
block, block, cancel, getActionState, isDone, submit |
Method Detail |
---|
boolean read()
void release()
void press()
void change()
Button setRead()
Button setRelease()
Button setPress()
Button setChange()
int getId()
boolean getValue()
int getTime()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |