-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSensor.h
More file actions
41 lines (31 loc) · 783 Bytes
/
Copy pathSensor.h
File metadata and controls
41 lines (31 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**********************************************************************
Sensor.h
COPYRIGHT (c) 2013-2015 Gregg E. Berman
Part of DCC++ BASE STATION for the Arduino
**********************************************************************/
#ifndef Sensor_h
#define Sensor_h
#include "Arduino.h"
#define SENSOR_DECAY 0.03
struct SensorData {
int snum;
byte pin;
byte 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, int=0);
static Sensor* get(int);
static void remove(int);
static void show();
static void status();
static void parse(char *c);
static void check();
}; // Sensor
#endif