Download this file
#include "button.h"

bool Button::canRun(uint32_t now) {
  return !sensor->calibrating && digitalRead(BUTTON_PIN) == LOW;
}

void Button::run(uint32_t now) {
  sensor->calibrating = true;
  Serial.println("click");
}

// vim:ft=arduino