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.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
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:
So then you're only doing a print every second, which shouldn't affect the speed.