diff --git a/wled00/usermod.cpp b/wled00/usermod.cpp index f054e3cb75..22fde5f953 100644 --- a/wled00/usermod.cpp +++ b/wled00/usermod.cpp @@ -83,9 +83,12 @@ void userLoop() { getSample(); // Sample the microphone agcAvg(); // Calculated the PI adjusted value as sampleAvg myVals[millis()%32] = sampleAgc; +#if defined(MIC_LOGGER) || defined(MIC_SAMPLING_LOG) || defined(FFT_SAMPLING_LOG) EVERY_N_MILLIS(20) { logAudio(); } +#endif + } if (audioSyncEnabled & (1 << 0)) { // Only run the transmit code IF we're in Transmit mode //Serial.println("Transmitting UDP Mic Packet");