Actually I should add that because of jsvIterateCallback, shiftOut supports objects as arguments, for instance a data argument containing extra stuff like {data:0,count:512}.
So with a tiny tweak to jsvIterateCallback your code could actually be written like this:
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.
Actually I should add that because of
jsvIterateCallback
,shiftOut
supports objects as arguments, for instance adata
argument containing extra stuff like{data:0,count:512}
.So with a tiny tweak to
jsvIterateCallback
your code could actually be written like this:This would be way faster, since it's not actually executing any JS in order to do the entire scan - including toggling the data lines.