2020-06-03 15:26:49 +02:00
|
|
|
#ifndef Sensor_h
|
|
|
|
#define Sensor_h
|
|
|
|
|
|
|
|
#include "Arduino.h"
|
|
|
|
|
|
|
|
#define SENSOR_DECAY 0.03
|
|
|
|
|
|
|
|
struct SensorData {
|
|
|
|
int snum;
|
|
|
|
uint8_t pin;
|
|
|
|
uint8_t pullUp;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Sensor{
|
|
|
|
static Sensor *firstSensor;
|
|
|
|
SensorData data;
|
|
|
|
boolean active;
|
|
|
|
float signal;
|
|
|
|
Sensor *nextSensor;
|
|
|
|
static void load();
|
|
|
|
static void store();
|
|
|
|
static Sensor *create(int, int, int);
|
|
|
|
static Sensor* get(int);
|
|
|
|
static bool remove(int);
|
2020-06-12 15:28:35 +02:00
|
|
|
static void show(Print & stream);
|
|
|
|
static void status(Print & stream);
|
|
|
|
static void check(Print & stream);
|
2020-06-03 15:26:49 +02:00
|
|
|
}; // Sensor
|
|
|
|
|
|
|
|
#endif
|