PWM case light
Hi all,
the printer I'm currently working on has some caselights. Since they're LEDS I want to PWM them. I adapted the M355 command to use analogwrites: analogWrite(11, com->S) (CASE_LIGHTS_PIN = 11). This actually worked but the printer goes into full fail mode. It says busy processing and never responds to a command anymore. Then I figured I should probably use the native M-command to do this: M42 P11 S100. Same problem!
I then added a new gcode command in the same way M106 works (setting fan power). This makes the case light flicker on and off since it doesn't use the internal PWM timers.
How to work around this problem? PWM apparently kills the printer and the timers in HAL.cpp don't switch fast enough.
the printer I'm currently working on has some caselights. Since they're LEDS I want to PWM them. I adapted the M355 command to use analogwrites: analogWrite(11, com->S) (CASE_LIGHTS_PIN = 11). This actually worked but the printer goes into full fail mode. It says busy processing and never responds to a command anymore. Then I figured I should probably use the native M-command to do this: M42 P11 S100. Same problem!
I then added a new gcode command in the same way M106 works (setting fan power). This makes the case light flicker on and off since it doesn't use the internal PWM timers.
How to work around this problem? PWM apparently kills the printer and the timers in HAL.cpp don't switch fast enough.
Comments