Skip to content

Instantly share code, notes, and snippets.

@rozek
Last active December 4, 2019 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rozek/25d4c261277b4155797f2fe24731dd7b to your computer and use it in GitHub Desktop.
Save rozek/25d4c261277b4155797f2fe24731dd7b to your computer and use it in GitHub Desktop.
Bangle.js: how many characters can be shown per line using the default font?
// how many characters can be shown per line on Bangle.js using the default font?
Bangle.setLCDMode(); // use normal display mode
g.clear();
g.setFont('4x6');
let Digits = '1234567890';
let StringToDraw = '';
for (let i = 0; i < 8; i++) { StringToDraw += Digits }
StringToDraw += '\n';
for (let i = 0; i < 8; i++) { StringToDraw += ' ' + (i+1) }
g.drawString(StringToDraw, 0,20);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment