You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Looks like i was wrong about soft:true, but I just had a quick look and you can get something working with the following:

    function t() {
      analogWrite(LED1,0.1+0.09*Math.sin(getTi­me()), {freq:100,forceSoft:true});
      analogWrite(LED2,0.1+0.09*Math.sin(getTi­me()*1.2324), {freq:100,forceSoft:true});
      analogWrite(LED3,0.1+0.09*Math.sin(getTi­me()*1.4634), {freq:100,forceSoft:true});
    setInterval(t, 50);

    Looks like there's a glitch with multiple soft PWM when you give some a value of 0 though (hence the 0.1+0.09*x).


Avatar for Gordon @Gordon started