10 #include "DCCpp_Uno.h" 11 #include "CurrentMonitor.h" 26 if(millis( ) -
sampleTime < CURRENT_SAMPLE_TIME)
34 if (this->
pin == UNDEFINED_PIN)
37 this->
current = (float)(analogRead(this->
pin) * CURRENT_SAMPLE_SMOOTHING + this->
current * (1.0 - CURRENT_SAMPLE_SMOOTHING));
39 int signalPin = DCCppConfig::SignalEnablePinProg;
40 if (signalPin == UNDEFINED_PIN)
41 signalPin = DCCppConfig::SignalEnablePinMain;
47 INTERFACE.print(this->
msg);
48 #if !defined(USE_ETHERNET) 49 INTERFACE.println(
"");
static long int sampleTime
static boolean checkTime()
void begin(int pin, const char *msg, float inSampleMax = 300)