Avatar for Wilberforce

Wilberforce

Member since Feb 2016 • Last active Oct 2018
  • 25 conversations
  • 724 comments

Most recent activity

  • in JavaScript
    Avatar for Wilberforce

    In the ide I think you may get warnings, however the interpreter itself can handle the code.

    From memory the acorn parser in the ide does not handle things like arrow functions.

  • in Projects
    Avatar for Wilberforce

    It looks like you are using an esp8266 - and this has very limited memory - you could try the save on send option in the ide, and this might out put the code into flash, saving more ram space.

  • in ESP32
    Avatar for Wilberforce

    Ok. And I can do the same branch for build tools.

    Do you want to raise an issue - or I can - and put in there the make file changes for the ESP-idf and then I can see if get that compiling as a first step?

  • in ESP32
    Avatar for Wilberforce

    How did you want to proceed?

    Did you want to put this into the esp32 branch and then I can see if I can get a build?

  • in ESP32
    Avatar for Wilberforce

    The firmware size is not that important as it’s just flash space right?

    What size did we make the partitions last time we changed?

  • in General
    Avatar for Wilberforce

    At start up - why not create a 0-89 indexed float array and store the value of the sin at each index. Then when you want to use the value - it's just a simple lookup - no computation. You just need to do some manipulation of the index - so for 100deg look up the 80 degree value - and for > 180 flip the sign...

    The compares might be slower so you could store the whole array - or 0-179.

    You could even store fixed point values rather than floating point.

  • in Pico / Wifi / Original Espruino
    Avatar for Wilberforce

    Push out the 5 secs - make it say 30 or 60 seconds.

    I would guess that you are running out of sockets. You could tell by, on connect, print out the socket number. These should get reused - but I think you are re- connecting so quickly that they don't get a chance to get reused.

  • in JavaScript
    Avatar for Wilberforce

    Go back and have a look at the sample: http://www.espruino.com/Writing+Modules

    You need to add a constructor function and export the reference to that.

    The bind your contants to that function. so if you called it myMod :

    var myMod = function (options) {
      this.options = {}    || options;
    };
    
    
    myMod.C = {
      U : "up",
      D : "down",
      L : "left",
      R : "right",
      N : "north",
      E : "east",
      S : "south",
      W : "west",
      T : "top",
      M : "middle",
      B : "bottom"
    };
    
    exports = myMod;
    
    my_mod=new myMod();
    print my_mod.C.U;
    
  • in General
    Avatar for Wilberforce

    Really need to see your code

Actions