You are reading a single comment by @Ruprect99 and its replies. Click here to read the full conversation.
  • Hi,

    I've been flashing ESP's for ages with Espruino and this is the first time I've seen this.

    I've got a really simple bit of code:

    function main() {
     var BTN = 12;
      var rgb = new Uint8ClampedArray(3*3);
      var pos = 0;
      function getPattern() {
        for (var i=0;i<rgb.length;) {
          rgb[i++] = (1 + Math.sin((i+pos)*0.1324)) * 127;
          rgb[i++] = (1 + Math.sin((i+pos)*0.1654)) * 127;
          rgb[i++] = (1 + Math.sin((i+pos)*0.1)) * 127;
        return rgb;
      setInterval(function() {
        require("neopixel").write(14, getPattern());
      }, 100);
    pinMode(12, 'input_pullup');
      setWatch(function(e) {
        console.log('bttn pressed');
      }, 12, { repeat: true, debounce:100, edge: 'falling' });
    E.on('init', main);

    Just to flash some LED's and listen to a button press, and if I type save in the console to store the code, I just get an endless loop of errors reading this:

    in function called from system
    Uncaught SyntaxError: Got [ERASED] expected EOF
    at line 1 col 1

    I'm sure I'm flashing the correct firmware (the V2.08 4mb ESP8266 version)

    Any ideas?




Avatar for Ruprect99 @Ruprect99 started