// Comment the following line to disable PID and enable bang-bang.
// Comment the following line to disable PID and enable bang-bang.
#define PIDTEMP
#define PIDTEMP
#ifdef PIDTEMP
#ifdef PIDTEMP
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
// If the temperature difference between the target temperature and the actual temperature
// If the temperature difference between the target temperature and the actual temperature
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_FUNCTIONAL_RANGE 10 // degC
#define PID_FUNCTIONAL_RANGE 10 // degC
#define PID_INTEGRAL_DRIVE_MAX PID_MAX // Limit for the integral term
#define PID_INTEGRAL_DRIVE_MAX PID_MAX // Limit for the integral term
#define LED_PIN 27 /* On some broken versions of the Sanguino libraries the pin definitions are wrong, which then needs LED_PIN as pin 28. But you better upgrade your Sanguino libraries! See #368. */
#define LED_PIN 27
#define ORIG_FAN_PIN 4 // Works for Panelolu2 too
#define ORIG_FAN_PIN 4 // Works for Panelolu2 too
#endif
#endif
#ifdef STB
#if MB(STB_11)
#define ORIG_FAN_PIN 4
#define ORIG_FAN_PIN 4
// Uncomment this if you have the first generation (V1.10) of STBs board
// Uncomment this if you have the first generation (V1.10) of STBs board