fixed bug in pwm code that turned the pin of if setValue(1.0) is called