Created
January 9, 2020 06:16
-
-
Save rozek/f3ae099ea784bacf551b9a38af975b60 to your computer and use it in GitHub Desktop.
Bangle.js: creates a bitmap from ASCII art
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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