You are reading a single comment by @Frida and its replies. Click here to read the full conversation.
  • I use function() instead of ()=>, because it doesn't work in my browser.
    And to stop analogWrite, use digatalRead.

    // sinus.js
    
    //setInterval( ()=> {analogWrite(D2, (Math.sin(getTime()) / 2.01) + 0.5 );},10);
    
    
    //setInterval( function() {analogWrite(D2, (Math.sin(getTime()) / 2.001) + 0.5 );},10);
    
    analogWrite(D2, 0.5, {freq:1000});
    
    //setTimeout(function() {analogWrite(D2, 0);},1700);
    
    setTimeout(function() {digitalRead(D2);},10);
    
    
About

Avatar for Frida @Frida started