DCCpp
This is the library version of a program for Arduino to control railroading DCC devices.
CurrentMonitor.h
1
/**********************************************************************
2
3
CurrentMonitor.h
4
COPYRIGHT (c) 2013-2016 Gregg E. Berman
5
6
Part of DCC++ BASE STATION for the Arduino
7
8
**********************************************************************/
9
10
#ifndef CurrentMonitor_h
11
#define CurrentMonitor_h
12
13
//#include "Arduino.h"
14
15
#define CURRENT_SAMPLE_SMOOTHING 0.01
16
#define CURRENT_SAMPLE_MAX 300
17
18
#if defined(ARDUINO_AVR_UNO) || defined(ARDUINO_AVR_NANO) // Configuration for UNO
19
#define CURRENT_SAMPLE_TIME 10
20
#else // Configuration for MEGA
21
#define CURRENT_SAMPLE_TIME 1
22
#endif
23
24
struct
CurrentMonitor
{
25
static
long
int
sampleTime;
26
int
pin;
27
float
current;
28
const
char
*msg;
29
void
begin(
int
,
const
char
*);
30
static
boolean
checkTime();
31
void
check();
32
};
33
34
#endif
35
CurrentMonitor
Definition:
CurrentMonitor.h:24
src
CurrentMonitor.h
Generated on mar. nov. 21 2017 16:45:31 for DCCpp by
1.2.10