I've checked your version and it takes about 0.16s on ESP32.
I agree, ESP32 its not the fastest on earth.
Anyway, this results in a black led-panel for a remarkable time, before new data is available.
To get a better idea what a setPixel driver in C could be, I created a version for testing. All together it is about 25 lines including initialization. Switching to this driver is done by adding panel:true to config of createArrayBuffer.
Wow, now a clear() takes less than 2msec. And I was able to create some kind of simple animation using graphics class.
I wonder, how we could add this to Espruino. It is specific for these kind of boards (P2.5,P3,P4,P5). It is not as specific as Neopixel, where we need implementation for each board. So it would be available for all boards.
My ideas behind using this panels are things like:
replacement of open/close panels (used in shops)
display simple processdata
all kinds of special boards, you can see in shops
art, just created a simple algorithm to create Mondrian like images ;-))
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.
I've checked your version and it takes about 0.16s on ESP32.
I agree, ESP32 its not the fastest on earth.
Anyway, this results in a black led-panel for a remarkable time, before new data is available.
To get a better idea what a setPixel driver in C could be, I created a version for testing. All together it is about 25 lines including initialization. Switching to this driver is done by adding panel:true to config of createArrayBuffer.
Wow, now a clear() takes less than 2msec. And I was able to create some kind of simple animation using graphics class.
I wonder, how we could add this to Espruino. It is specific for these kind of boards (P2.5,P3,P4,P5). It is not as specific as Neopixel, where we need implementation for each board. So it would be available for all boards.
My ideas behind using this panels are things like: