Skip to content

Instantly share code, notes, and snippets.

@noopkat
Last active October 18, 2015 03:09
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 noopkat/a7735be51ed167534254 to your computer and use it in GitHub Desktop.
Save noopkat/a7735be51ed167534254 to your computer and use it in GitHub Desktop.
OLED-js custom font testing
var five = require('johnny-five');
var board = new five.Board();
var Oled = require('oled-js');
// require your newly made font file
var mycoolfont = require('./mycoolfont.js');
// testing features
board.on('ready', function() {
// I2C va USB or whatever your settings are
var opts = {
width: 128,
height: 64,
address: 0x3D
};
var oled = new Oled(board, five, opts);
oled.update();
oled.setCursor(0, 0);
oled.writeString(mycoolfont, 1, "G'day mate", 1, true, 1);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment