diff options
author | kliment <kliment.yanev@gmail.com> | 2011-09-17 07:28:29 -0700 |
---|---|---|
committer | kliment <kliment.yanev@gmail.com> | 2011-09-17 07:28:29 -0700 |
commit | d6fe1dab44a452fcd223c03524698f040407e61f (patch) | |
tree | de07b48ab16c9724dbfc90ba19744b1ff9f94774 | |
parent | 51a0f47d4791f77205d9a8d199b0242bf9b5beb0 (diff) | |
parent | 80f186ebe05615fe7127914ce71186564ae29ea0 (diff) |
Merge pull request #91 from alexrj/alarm-pin
Signal an optional ALARM_PIN when reaching MAXTEMP
-rw-r--r-- | Sprinter/Sprinter.pde | 11 | ||||
-rw-r--r-- | Sprinter/pins.h | 8 |
2 files changed, 18 insertions, 1 deletions
diff --git a/Sprinter/Sprinter.pde b/Sprinter/Sprinter.pde index 8e94db8..d385285 100644 --- a/Sprinter/Sprinter.pde +++ b/Sprinter/Sprinter.pde @@ -292,9 +292,11 @@ void setup() #if (HEATER_0_PIN > -1) SET_OUTPUT(HEATER_0_PIN); + WRITE(HEATER_0_PIN,LOW); #endif #if (HEATER_1_PIN > -1) SET_OUTPUT(HEATER_1_PIN); + WRITE(HEATER_1_PIN,LOW); #endif //Initialize Fan Pin @@ -302,6 +304,12 @@ void setup() SET_OUTPUT(FAN_PIN); #endif + //Initialize Alarm Pin + #if (ALARM_PIN > -1) + SET_OUTPUT(ALARM_PIN); + WRITE(ALARM_PIN,LOW); + #endif + //Initialize LED Pin #if (LED_PIN > -1) SET_OUTPUT(LED_PIN); @@ -1471,6 +1479,9 @@ void manage_heater() #ifdef MAXTEMP if(current_raw >= maxttemp) { target_raw = 0; + #if (ALARM_PIN > -1) + WRITE(ALARM_PIN,HIGH); + #endif } #endif #if (TEMP_0_PIN > -1) || defined (HEATER_USES_MAX6675) || defined (HEATER_USES_AD595) diff --git a/Sprinter/pins.h b/Sprinter/pins.h index 8571d20..fd9995d 100644 --- a/Sprinter/pins.h +++ b/Sprinter/pins.h @@ -57,6 +57,7 @@ #define FAN_PIN -1 #define PS_ON_PIN 15 #define KILL_PIN -1 +#define ALARM_PIN -1 #define HEATER_0_PIN 6 #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! @@ -130,6 +131,7 @@ #define FAN_PIN -1 #define PS_ON_PIN -1 #define KILL_PIN -1 +#define ALARM_PIN -1 #define HEATER_0_PIN 14 #define TEMP_0_PIN 4 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! @@ -191,6 +193,7 @@ #define FAN_PIN -1 #define KILL_PIN -1 +#define ALARM_PIN -1 #define HEATER_0_PIN -1 #define TEMP_0_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! @@ -379,6 +382,7 @@ #define FAN_PIN 9 #define PS_ON_PIN 12 #define KILL_PIN -1 +#define ALARM_PIN -1 #define HEATER_0_PIN 10 #define HEATER_1_PIN 8 @@ -415,7 +419,7 @@ #define LED_PIN 13 #define PS_ON_PIN -1 #define KILL_PIN -1 - +#define ALARM_PIN -1 #ifdef RAMPS_V_1_0 // RAMPS_V_1_0 @@ -486,6 +490,7 @@ #define FAN_PIN 5 #define PS_ON_PIN -1 #define KILL_PIN -1 +#define ALARM_PIN -1 #define HEATER_0_PIN 6 #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! @@ -587,6 +592,7 @@ #define PS_ON_PIN -1 #define KILL_PIN -1 +#define ALARM_PIN -1 #define HEATER_0_PIN 13 // (extruder) |