Skip to content

Instantly share code, notes, and snippets.

@rileyjshaw
Last active October 18, 2020 01:22
Show Gist options
  • Save rileyjshaw/1b306b00c57dfdf830987f89507028e3 to your computer and use it in GitHub Desktop.
Save rileyjshaw/1b306b00c57dfdf830987f89507028e3 to your computer and use it in GitHub Desktop.
Quick metaprogram for 16-segment display animations using my "Seg16" C library.
console.log('20CEBA954FB7301896D'.split('').map(n => {
const b = `segments.writeStream(0b${(1 << parseInt(n, 16)).toString(2)});`;
return `blinkDots();\n${b}\n${b}\ndelay(100);\n`;
}).join(''));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment