diff options
author | Kliment <kliment@klimentbox.(none)> | 2011-08-02 21:47:32 +0200 |
---|---|---|
committer | Kliment <kliment@klimentbox.(none)> | 2011-08-02 21:47:32 +0200 |
commit | 96291e27a89f2e68e00a3d90f2a8bd3b8bba8d97 (patch) | |
tree | 3075359faba0fb606517f395393d0684bbc12e8f | |
parent | b3280f5adcb0c968f5f2b1bf5a15d2d1dcc88f44 (diff) |
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.
-rw-r--r-- | Sprinter/Sprinter.pde | 2 |
1 files changed, 2 insertions, 0 deletions
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 |