Avatar for sebafudi

sebafudi

Member since Apr 2019 • Last active Mar 2022
  • 1 conversations
  • 3 comments

Most recent activity

    • 11 comments
    • 3,698 views
  • in ESP32
    Avatar for sebafudi

    @Robin I wasn't using console.log in main code, and it was slow, so I don't think that's it.

    console.log('a');
    

    was just for test.

    @allObjects
    This code was just to test espruino and esp32 with my LEDs. In final code, LED pattern will be streamed from outside through web, so shifting entire array will be useless.

  • in ESP32
    Avatar for sebafudi

    This code is a little bit smoother I think, but it's about this same speed. I think looping through all objects in array is so slow, because I've commented out all other things, and it's still slow. I'm not even using neopixel library with this.

    function getPattern() {
      pos++;
      for (var i=0;i<arr.length;i+=3);
      console.log('a');
        //arr.set(E.HSBtoRGB((i+pos)*0.01,1,1,1)­,i);
    }
    
    

    I've done this

    arr.set(E.HSBtoRGB((0+pos)*0.01,1,1,1),0­);
    arr.set(E.HSBtoRGB((3+pos)*0.01,1,1,1),3­);
    arr.set(E.HSBtoRGB((6+pos)*0.01,1,1,1),6­);
    arr.set(E.HSBtoRGB((9+pos)*0.01,1,1,1),9­);
    [...] 97 times
    

    And it's still slow.

  • in ESP32
    Avatar for sebafudi

    Hello.
    I'm using example code to ws2811, and it's very slow. This example
    He're is a video https://youtu.be/nvfhA3Y54ss


    It's working ok when using <10 LEDs, but when I try to use more (I have 97 of them) it's very slow as in video. I've tried using Arduino for it and it worked perfectly. Same was for MicroPython. Is there some kind of setting I'm missing? I've even tried running only "for" loop that was counting to 10 000, and It took like 2 or 3 seconds. I've tried this same in MicroPython and it worked instantly.

Actions