• v1.52 has fixed a memory leak problem according to https://github.com/espruino/Espruino/blo­b/master/ChangeLog
    The below program will run out the memory soon on Espruino v1.50 and now on v1.52 it works fine.

    var bulbs=[0,0,1];
    function rotate() {
    var temp = bulbs[0];
    bulbs = bulbs.slice(1);
    bulbs.push(temp);
    digitalWrite(LED1, bulbs[0]);
    digitalWrite(LED2, bulbs[1]);
    digitalWrite(LED3, bulbs[2]);
    }
    var interval = setInterval(rotate, 50);

About

Avatar for hcchen @hcchen started