You are reading a single comment by @jnewcomb and its replies. Click here to read the full conversation.
  • Hi, can anyone give the current state of play with PWM functions with espruinĀ­o_1v84.tve_master_d8dec28_esp8266?
    Intro states it's not yet implemented, but see code in github
    https://github.com/espruino/Espruino/blob/master/targets/esp8266/jshardware.c
    jshPinAnalogOutput

    So I've been playing - trying getting it working. Im getting WDT timeouts when ever I call 'analogWrite' in any of its forms

    
    analogWrite(D4, 0.5);
    =undefined
    

    Working with Web IDE so the following message gets sent to the UART


    ets Jan 8 2013,rst cause:4, boot mode:(3,3)
    wdt reset
    load 0x40100000, len 1396, room 16
    tail 4
    chksum 0x89
    load 0x3ffe8000, len 776, room 4
    tail 4
    chksum 0xe8
    load 0x3ffe8308, len 540, room 4
    tail 8
    chksum 0xc0
    csum 0xc0
    2nd boot version : 1.4(b1)
    SPI Speed : 40MHz
    SPI Mode : DIO
    SPI Flash Size & Map: 32Mbit(512KB+512KB)
    jump to run user1 @ 1000

    Tried a number of combinations:
    Tried pin D14 too

    D4.mode('af_output');
    analogWrite(D4, 0.5,{freq:10});
    D4.mode('output');
    analogWrite(D4, 0.5,{freq:10});
    analogWrite(D4, 0.5,{freq:100, soft:true});
    analogWrite(D4, 0.5);

    PS
    Great project and fun to play with..

About

Avatar for jnewcomb @jnewcomb started