Last active
October 18, 2015 03:09
-
-
Save noopkat/a7735be51ed167534254 to your computer and use it in GitHub Desktop.
OLED-js custom font testing
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
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