You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Logging in Puck.js (when you're connected via Bluetooth) really slows things down (25ish FPS sounds about right) - so that would definitely be something to avoid doing often. When you're not connected it should be ok, but then there's not much point having them :)

    Neopixel writes should be pretty much as fast as they can get, however the actual JS code execution speed isn't huge, so that alone could be slowing things down for you.

    If you want to log speed I'd do:

    var frames = 0;
    var arr = new Uint8ClampedArray(leds*3);
    function animate() {
      neopixel.write(D30, arr);
      frames++;
    }
    setInterval(animate, 1);
    setInterval(function() {
      console.log(frames);
      frames=0;
    }, 1000);
    

    So then you're only doing a print every second, which shouldn't affect the speed.

About

Avatar for Gordon @Gordon started