Download this file
#ifndef BUTTON_H
#define BUTTON_H

#include "sensor.h"
#include "Scheduler.h"

class Button : public Task {
  public:
    Button(Sensor * _sensor) {
      sensor = _sensor;
      pinMode(BUTTON_PIN, INPUT_PULLUP);
    };
    bool canRun(uint32_t now);
    void run(uint32_t now);
  private:
    Sensor * sensor;
};
#endif