Looks great!
Just to add that digitalWrite can take an array of pins, so certain things can be really simplified/sped up. For example:
digitalWrite
for (var a in anodes) { digitalWrite(anodes[a], 0); } // is the same as digitalWrite(anodes, 0);
and similarly if you have a bit pattern that you want to output to all anodes at once you can do digitalWrite(anodes, pattern);.
digitalWrite(anodes, pattern);
@Gordon started
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.
Looks great!
Just to add that
digitalWrite
can take an array of pins, so certain things can be really simplified/sped up. For example:and similarly if you have a bit pattern that you want to output to all anodes at once you can do
digitalWrite(anodes, pattern);
.