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
14
#define CURRENT_SAMPLE_SMOOTHING 0.01
15
19
#if defined(ARDUINO_AVR_UNO) || defined(ARDUINO_AVR_NANO) // Configuration for UNO
20
#define CURRENT_SAMPLE_TIME 10
21
#else // Configuration for MEGA
22
#define CURRENT_SAMPLE_TIME 1
23
#endif
24
27
struct
CurrentMonitor
{
28
static
long
int
sampleTime
;
29
int
pin
;
30
float
currentSampleMax
;
31
float
current
;
32
const
char
*
msg
;
38
void
begin
(
int
pin,
const
char
*msg,
float
inSampleMax = 300);
41
static
boolean
checkTime
();
44
void
check
();
45
};
46
47
#endif
48
CurrentMonitor::check
void check()
Definition:
CurrentMonitor.cpp:32
CurrentMonitor::begin
void begin(int pin, const char *msg, float inSampleMax = 300)
Definition:
CurrentMonitor.cpp:16
CurrentMonitor::msg
const char * msg
Definition:
CurrentMonitor.h:32
CurrentMonitor::checkTime
static boolean checkTime()
Definition:
CurrentMonitor.cpp:24
CurrentMonitor::current
float current
Definition:
CurrentMonitor.h:31
CurrentMonitor::currentSampleMax
float currentSampleMax
Definition:
CurrentMonitor.h:30
CurrentMonitor::pin
int pin
Definition:
CurrentMonitor.h:29
CurrentMonitor::sampleTime
static long int sampleTime
Definition:
CurrentMonitor.h:28
CurrentMonitor
Definition:
CurrentMonitor.h:27
src
CurrentMonitor.h
Generated on lun. avr. 2 2018 10:45:19 for DCCpp by
1.2.10