#ifndef BLINKER_H
#define BLINKER_H
#include "co2_meter.h"
#include "sensor.h"
#include "Scheduler.h"
class Blinker: public TimedTask {
public:
Blinker(Sensor * _sensor):
TimedTask(0),
rate(5),
light_on(false) {
sensor = _sensor;
pinMode(RED_LED_PIN, OUTPUT);
digitalWrite(RED_LED_PIN, LOW);
};
bool canRun(uint32_t now);
void run(uint32_t now);
protected:
uint8_t rate; // in 0.1s units
bool light_on;
Sensor * sensor;
};
#endif
// vim:ft=arduino