Avatar for JumJum

JumJum

Member since Oct 2013 • Last active Feb 2019
  • 119 conversations
  • 604 comments

Most recent activity

  • in ESP32
    Avatar for JumJum

    @SergeP took a closer look to NEOpixel and created a new version.
    Please see attached file.
    And this is explanation from @SergeP

    After FIFO maximizing everything works in my case. I've found that, as I wrote, there are two classes of high-priority delays (it may be other interrupts) which delay neopixel_handleInterrupt() call. One class is about 1 original buffer, so about 1,25us*64bit=80us, another one is about 4..5 times longer - 300...400 us.
    Now I use full RMT buffer and it's enough to neopixel code work. But it is impossible to use pulses on pins at the same time. This was not possible before my changes, too. But it was possibility to fix that, while my code makes it principially impossible.

  • in ESP32
    Avatar for JumJum

    Only a few pins are available for setWatch. Its checked with jshCanWatch in targets/ESP32/jshardware.c
    Just checked with D12 and that works.

    bool jshCanWatch(
        Pin pin //!< The pin that we are asking whether or not we can watch it.
      ) {
      return pin == 0 || ( pin >= 12 && pin <= 19 ) || pin == 21 ||  pin == 22 || ( pin >= 25 && pin <= 27 ) || ( pin >= 34 && pin <= 39 );
    }
    
  • in ESP32
    Avatar for JumJum

    ESP32 uses some firmware already on chip (ROM) and some precompiled libs for BT
    I'm pretty sure, 22 limit is hidden there
    In latest ESP-IDF- versions, some functions from ROM are moved to flash. This is one reason why size of binaries increased that much.
    Not helpful for you (sorry), but at least you know why we have these, and other, limits

  • in JavaScript
    Avatar for JumJum

    You could try ESP32 WROVER board, which has additional PSRAM.
    Right now it supports 320kb, and could be expanded.
    See espruinoTask(void *data) in https://github.com/espruino/Espruino/blo­b/master/targets/esp32/main.c
    Each jsVar takes 16 bytes, so 20000 jsVars are 320kb
    To put water into the wine, I would still expect firebase is way too large for these small chips.

    • 4 comments
    • 198 views
  • in ESP32
    Avatar for JumJum

    ESP-IDF itself creates different tasks for wifi, bluetooth etc.
    Espruino port for ESP32 uses 2 tasks, one for Espruino itself and 2nd for uart console, see targets/esp32/main.c
    There has been a first question/idea from @Wilberforce to move some of those tasks to 2nd core.
    Don't know if somebody has experience with that.

    Splitting Espruino itself into several tasks would be (IMHO/AFAIK) a complex rebuild.
    Running 2 Espruino tasks, one on each core, hmm, memory is too small for that.
    One could think about supporting SPI, I2C seperately, but again, this would be a complex rebuild.

    Some months ago, I asked in ESP32 forum for experience using both cores.
    At the end, feedback was more or less a theoretical description, how powerful it would be for example for graphics. No feedback about experiences in own projects.
    Looks like 2 cores are not (yet?) used in real applications.

  • in JavaScript
    Avatar for JumJum

    The idea behind speedy is slightly different.
    forEach is running with one callbackFn only.
    Idea is to combine different functions with a default function.
    Thats close to your changes to shiftOut.
    in this example we combine a simple console.log with pin.set/reset

    function fill(){
      arr = [];
      arr.push({callback:en.reset.bind(en)});
      arr.push({callback:console.log.bind(cons­ole,"qwertz\n")});
      arr.push({callback:en.set.bind(en)});
      arr.push({callback:console.log.bind(cons­ole,"asdf\n")});
      arr.push([1,3,5]);
      arr.push("abc");
    }
    
    x = console.log.bind(console,"z:");
    function speed(n){
      fill();
      if(!n) n = 100;
      var t = getTime();
      for(var i = 0; i < n; i++) E.speedy(x,arr);
      console.log(getTime() -t);
    }
    
    

    I would not say, this is standard Javascript ;-), it could be helpful, but is it worth it ?

  • in Electronics
    Avatar for JumJum

    Works perfect now!
    Thanks a lot and have a nice christmas.

Actions