12 #include "DCCpp_Uno.h" 13 #include "CurrentMonitor.h" 29 if(millis( ) -
sampleTime < CURRENT_SAMPLE_TIME)
37 if (this->
pin == UNDEFINED_PIN || this->
signalPin == UNDEFINED_PIN)
40 this->
current = (float)(analogRead(this->
pin) * CURRENT_SAMPLE_SMOOTHING + this->
current * (1.0 - CURRENT_SAMPLE_SMOOTHING));
46 DCCPP_INTERFACE.print(this->
msg);
47 #if !defined(USE_ETHERNET) 48 DCCPP_INTERFACE.println(
"");
static boolean checkTime()
void begin(int pin, int inSignalPin, const char *msg, float inSampleMax=300)
static long int sampleTime