A idea to use 3 time shift came from a snippet tve gave me, this can be used to rotate / walk like this small sample shows:
// large ring with 24 NPs
var NPs = 24;
var array = new Array(NPs*3).fill(0);
array[0] = array[1] = array[2] = 32;
function rotate() {
array.push(array.shift());
array.push(array.shift());
array.push(array.shift());
}
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.
ok - I understand - first point is the best ;-)
I prefer to have JS solutions ;-)
A idea to use 3 time shift came from a snippet tve gave me, this can be used to rotate / walk like this small sample shows: