|
Treehopper C# API
|
A DigitalInPin-only implementation for the C and Z buttons More...
Public Member Functions | |
| Task< bool > | AwaitDigitalValueChangeAsync () |
| Wait for the button to change state More... | |
| async Task | MakeDigitalInAsync () |
| Unused. More... | |
Properties | |
| bool | DigitalValue [get, set] |
| Gets the digital state of the button. More... | |
Events | |
| OnDigitalInValueChanged | DigitalValueChanged |
| Fires when the button state changes More... | |
A DigitalInPin-only implementation for the C and Z buttons
| Task<bool> AwaitDigitalValueChangeAsync | ( | ) |
Wait for the button to change state
If the parent Nunchuk's WiiNunchuk.AutoUpdateWhenPropertyRead is "true", executing this function will start a Task that will poll the Nunchuk at an update rate specified by WiiNunchuk.AwaitPollingInterval until the button's state changes. Otherwise, this will return an awaitable (empty) task that will complete when the button state changes (the user is required to call WiiNunchuk.Update() periodically).
Implements DigitalIn.
| async Task MakeDigitalInAsync | ( | ) |
|
getset |
Gets the digital state of the button.
"0" for "unpressed" and "1" for "pressed"
| OnDigitalInValueChanged DigitalValueChanged |
Fires when the button state changes