summaryrefslogtreecommitdiff
path: root/Sprinter
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2011-09-17 14:54:39 +0200
committerAlessandro Ranellucci <aar@cpan.org>2011-09-17 14:54:39 +0200
commit205d115002a18c7c9ccd8dc2aed388196772fadb (patch)
tree600392151bc64758269c90d27a42bcd729702d57 /Sprinter
parentf2d626836e07effe5dfa8d1b1a06b735a565bb42 (diff)
Signal an optional ALARM_PIN when reaching MAXTEMP
Alarm signal can be dismissed by hard-resetting the board or by sending a M42 P23 S0 command (where 23 is the ALARM_PIN)
Diffstat (limited to 'Sprinter')
-rw-r--r--Sprinter/Sprinter.pde9
-rw-r--r--Sprinter/pins.h8
2 files changed, 16 insertions, 1 deletions
diff --git a/Sprinter/Sprinter.pde b/Sprinter/Sprinter.pde
index cc1434f..f04e374 100644
--- a/Sprinter/Sprinter.pde
+++ b/Sprinter/Sprinter.pde
@@ -302,6 +302,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 Step Pins
#if (X_STEP_PIN > -1)
SET_OUTPUT(X_STEP_PIN);
@@ -1465,6 +1471,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)