   const double PTB = -5.775e-7;
   double temperature = 
     -(PTA/PTB/2)-sqrt((PTA/PTB/2)*(PTA/PTB/2)-(1-R_PT100/100)/PTB);
-  return(temperature);
+  return(filt_2nd_stage.processReading(temperature));
 }
 
 void setup() {

#include <Plotter.h>
#include <Thread.h>
#include <ThreadController.h>

Plotter plotter; // for plotting over serial



// Analog input for temperature measurement: 
const int TEMP_INP = A7;

/* The temperature signal is lowpass filtered using a
 * moving average filter during the acquisition.
 * The cutoff of that filter is still pretty high for
 * a temperature signal, we need another FIR
 * filter with the cutoff in the .5Hz range.
 */
FIR<double, 15> filt_2nd_stage;

void plot_callback(void) {
  // plotting thread
