Download this file
#ifndef BLINKER_H
#define BLINKER_H

#include "leffakone_timer.h"
#include "Scheduler.h"

class Blinker: public TimedTask {

  public:
    Blinker(uint8_t rate): 
      TimedTask(0),
      rate(rate),
      enabled(false),
      light_on(true) {
        pinMode(LED_PIN, OUTPUT);
        digitalWrite(LED_PIN, light_on);
      };
    bool canRun(uint32_t now);
    void run(uint32_t now);
    void start(uint8_t rate);
    void stop();

  protected:
    uint8_t rate; // in 0.1s units
    bool enabled;
    bool light_on;
};

#endif
// vim:ft=arduino