Skip to content

Instantly share code, notes, and snippets.

@rozek
Created January 9, 2020 06:16
Show Gist options
  • Save rozek/f3ae099ea784bacf551b9a38af975b60 to your computer and use it in GitHub Desktop.
Save rozek/f3ae099ea784bacf551b9a38af975b60 to your computer and use it in GitHub Desktop.
Bangle.js: creates a bitmap from ASCII art
Bangle.setLCDMode('120x120');
g.clear();
const Width = g.getWidth(), CenterX = Width/2;
const Height = g.getHeight(), CenterY = Height/2;
g.setColor(1,1,0);
g.drawImage(Graphics.createImage(`
****
******
******
**
******
****
`),CenterX-10,CenterY);
g.drawImage(Graphics.createImage(`
****
******
**
**
******
****
`),CenterX,CenterY);
g.drawImage(Graphics.createImage(`
****
***
**
**
***
****
`),CenterX+10,CenterY);
g.flip();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment