 	return pTerm + dTerm + iTerm;
 }
 
-#define TEMPERATURE_DATA_POINT_COUNT 10
+#define TEMPERATURE_DATA_POINT_COUNT 100
 float getTemperature()
 {
   uint32_t sum = 0;

	Serial.println();
	printDataHeader();

	temp = getTemperature();
	pinMode(HEATER_PIN, OUTPUT);
	heaterOff();

  tempSetPoint = TARGET;

	pid.init();
	pidDrive = updatePID(&pid, tempSetPoint - temp, temp);
	heaterDutyCycle = DUTY_INIT;

	timeZero = millis();

#define TEMP_ADC_PIN A3
#define HEATER_PIN 8

#define SAMPLE_DELAY_MS 250L
#define HEATER_PERIOD_MS 10000L
#define PID_UPDATE_PERIOD_MS 125L

//#define OPEN_LOOP_MODE
#define P_MODE
//#define I_MODE
//#define PI_MODE
//#define PD_MODE
//#define PID_MODE

#	define DUTY_INIT 0.0

#define PGAIN 0.1
#define IGAIN 0
#define DGAIN 0
#define IMIN 0
#define IMAX 100

#define TARGET 23.5 // 21.5C ambient + 23.5C rise = 45C target

#define TEMP_TO_DUTY_SLOPE 0.1
#define TEMP_TO_DUTY_OFFSET 0.0
