Skip to content

Instantly share code, notes, and snippets.

@hitherejoe
Created April 30, 2017 17:55
Embed
What would you like to do?
public void openPushButtonGpioPin(Button.OnButtonEventListener buttonCallback) {
try {
Button button = new Button(BoardDefaults.getPushButtonGpioPin(),
Button.LogicState.PRESSED_WHEN_LOW);
button.setOnButtonEventListener(buttonCallback);
} catch (IOException error) {
Timber.e(error, "There was an error configuring the push button GPIO pin");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment