Testing the QDSP-6064...
const cathodes = [D24,D23,D27]; const anodes = [D28,D29,D30,D31,D1,D2,D11]; var k = 2; var pattern = 1; var count = 0; const maxa = (1 << anodes.length) - 1; setInterval(() => { "compiled"; for (var a in anodes) { digitalWrite(anodes[a], 0); } digitalWrite(cathodes[k++], 1); if (k >= cathodes.length) { k = 0; } digitalWrite(cathodes[k], 0); if (count ++ == 20) { count = 0; pattern++; if (pattern + k > maxa) { pattern = 1; } console.log(pattern); } for (a in anodes) { digitalWrite(anodes[a], ((pattern + k) & (1 << a)) ? 1 : 0); } }, 1);
1 Attachment
@rmd6502 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.
Testing the QDSP-6064...
1 Attachment