Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@monkbroc
Created November 6, 2015 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monkbroc/f7aad277e4f6d5c51c83 to your computer and use it in GitHub Desktop.
Save monkbroc/f7aad277e4f6d5c51c83 to your computer and use it in GitHub Desktop.
Photon Button Press
void loop() {
static bool pressedOld = false;
bool pressed = HAL_Core_Mode_Button_Pressed(50);
if (pressed && !pressedOld) {
Particle.publish("press");
}
pressedOld = pressed;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment