Skip to content

Instantly share code, notes, and snippets.

@hitherejoe hitherejoe/button.java Secret
Created Apr 30, 2017

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
You can’t perform that action at this time.