From 96291e27a89f2e68e00a3d90f2a8bd3b8bba8d97 Mon Sep 17 00:00:00 2001 From: Kliment Date: Tue, 2 Aug 2011 21:47:32 +0200 Subject: When you set PWM on a pin to a given value and then WRITE a 0 to it, the PWM timer does not stop. Set the PWM to 0 as well to prevent hotend meltdowns. --- Sprinter/Sprinter.pde | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Sprinter/Sprinter.pde') diff --git a/Sprinter/Sprinter.pde b/Sprinter/Sprinter.pde index c6932cf..76c221f 100644 --- a/Sprinter/Sprinter.pde +++ b/Sprinter/Sprinter.pde @@ -1421,6 +1421,7 @@ void manage_heater() if(watch_raw + 1 >= current_raw){ target_raw = 0; WRITE(HEATER_0_PIN,LOW); + analogWrite(HEATER_0_PIN, 0); #if LED_PIN>-1 WRITE(LED_PIN,LOW); #endif @@ -1452,6 +1453,7 @@ void manage_heater() if(current_raw >= target_raw) { WRITE(HEATER_0_PIN,LOW); + analogWrite(HEATER_0_PIN, 0); #if LED_PIN>-1 WRITE(LED_PIN,LOW); #endif -- cgit v1.2.1