Pushbutton attached to DigitalIn
More...
|
| bool | Pressed => Input.DigitalValue ^ activeLow |
| | Determines whether the button is pressed (by reading Input.DigitalValue) More...
|
| |
Pushbutton attached to DigitalIn
◆ Button()
Construct a new Button attached to a DigitalIn input.
- Parameters
-
| input | The DigitalIn the button is attached to |
| activeLow | Whether the button is active-low (true, default). If the button is active-high, set to false. |
◆ ButtonPressedEventHandler()
◆ ButtonReleasedEventHandler()
◆ AwaitButtonChangedAsync()
| async Task<bool> AwaitButtonChangedAsync |
( |
| ) |
|
Wait for the button to change state
- Returns
- An awaitable Task that returns a bool indicating if the button is pressed
◆ ToString()
| override string ToString |
( |
| ) |
|
Gets a string representing of whether the button is pressed or not
- Returns
◆ Pressed
| bool Pressed => Input.DigitalValue ^ activeLow |
Determines whether the button is pressed (by reading Input.DigitalValue)
◆ Input
◆ OnPressed
Fired whenever the button is pressed
◆ OnReleased
Fired whenever the button is released
◆ PropertyChanged
| PropertyChangedEventHandler PropertyChanged |
The documentation for this class was generated from the following file:
- F:/Git/treehopper-sdk/NET/API/Treehopper.Libraries/Input/Button.cs