Treehopper C# API
DigitalInPeripheralPin Class Reference

A DigitalInPin-only implementation for the C and Z buttons More...

Inheritance diagram for DigitalInPeripheralPin:
DigitalIn DigitalBase

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...
 

Detailed Description

A DigitalInPin-only implementation for the C and Z buttons

Member Function Documentation

◆ AwaitDigitalValueChangeAsync()

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).

Returns
The new state of the button

Implements DigitalIn.

◆ MakeDigitalInAsync()

async Task MakeDigitalInAsync ( )

Unused.

Stub for DigitalInPin compliance.

Implements DigitalIn.

Property Documentation

◆ DigitalValue

bool DigitalValue
getset

Gets the digital state of the button.

"0" for "unpressed" and "1" for "pressed"

Event Documentation

◆ DigitalValueChanged

OnDigitalInValueChanged DigitalValueChanged

Fires when the button state changes


The documentation for this class was generated from the following file: