• Firstly, I saw the PWM does not work. Code exists but doesn't work. in the ESP8266 reference.
    But when I tried the simple example ( analogWrite(D12, 0.5)) , I measured the voltage half of 3.3V at the D12 pin. So I thought that PWM is running. And then,

    I tried Waveform example but I can not run this example on ESP8266.

    var s = atob("f4GBgoODh5GtnmgkE1m435g/MobgzYJbd4­1YHkHD/7UoEZPysyscl/K5PSqLy5tLToqdfHGdrX­I1V7vUeiVIqceEUG2kmWVfj6qIWFuKpZFpXXiXkn­NthZB9cH6LgG5vgJKSdWF7oZVoXHuRioJ8c3iJjH­tweomLf3JygpCHdHOCiYJ8fYCBg4ODgn53d4CGiI­Z8cHGAjo1+dn6Jh3pzeoWHfXd8hYd8d3+Gg3t1e4­F9d36KiHp0fYZ+cneLlol3cnyEgXt8g4WBeXV8ho­qDdnOCjoNxc4aRhnd3f4J6cXmNlIJxd4mKeXJ5iI­2Denh9fX1/f4B/g4N2bnuSlYJzdoOIgXp7g4V+dn­mDhoF9gIF+eHqDioJyb3+Oi3xzeIOHgXp7gIB+fH­+DgHt8hIh/cnOEjoVzb32Mi3pxeYeLf3N2hIqBdX­aBhoB7fYSGfXZ7hYeAeXl9goJ9e36BgYGCgoF8e4­GDgHp6f4ODgHo=");
    var w = new Waveform(s.length);
    w.buffer.set(s);
    BUZZER = D12
    analogWrite(BUZZER, 0.5, {freq:20000}); 
    w.startOutput(BUZZER,4000);
    

    I got WARNING:Unable to schedule a timer. error.

    How can I fix it ? or Is the PWM does not run yet on ESP8266?

  • I thought waveform required a DAC, not just PWM. I have no idea what it would output otherwise...

    The ESP8266 does not have a DAC, and doesn't even have hardware PWM, just software PWM, with all it's attendant limitations.

    I think the bug is that waveform module is being build for ESP8266 at all.

  • ...just give up trying to do time critical things on ESP8266... worst case you resort to your ATtiny841s as slaves to do the job....

  • Yeah, Waveform can be used for ADC reads so might work on ESP8266 for that, but it needs either DAC or PWM hardware for waveform output.

    Having said that, ESP8266 isn't great for time critical stuff, so even if you could get analog read working, chances are it wouldn't be reading at the correct freq all the time

    Moving to the ESP8266 forum...

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Unable to schedule a timer Error in Waveform Example

Posted by Avatar for mesutevin @mesutevin

Actions