       write_state(calibrated_input);
     }
   }
-  
-  process_input(input, calibrated_input, smoothed_input, lcd);
+
+  // Output.
+  int calibrated_gas = calibrated_input(raw_gas);
+  render_input(calibrated_gas, lcd);
 }

#include <LiquidCrystal.h>
#include <EEPROM.h>

#define GAS_INPUT A0
#define CALIBRATE_BUTTON 2
#define CALIBRATION_DURATION 10 // seconds
#define SMOOTHING_FACTOR 0.9
#define STATE_HEADER 0xcafebabe

void read_state (CalibratedInput& calibrated_input)

  print2(lcd, calibration.time_remaining(t));
}

void render_input (int input, LiquidCrystal& lcd)
{
  lcd.setCursor(6,0);
  print3(lcd, input);
}

LiquidCrystal lcd(7, 6, 8, 9, 10, 11);
