Created
July 26, 2016 16:01
-
-
Save Torsten85/dcf64f6c2c8a21cbeeacf3fa96b5686f to your computer and use it in GitHub Desktop.
JohnnyFive / chip-io / oled
This file contains hidden or 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 Chip = require('chip-io'); | |
var Oled = require('oled-js'); | |
var io = new Chip(); | |
io.i2cConfig({ | |
address: 0x3c, | |
bus: 2 | |
}); | |
var board = new five.Board({ | |
io: io | |
}); | |
board.on('ready', function () { | |
var oled = new Oled(board, five, { | |
width: 128, | |
height: 64, | |
address: 0x3c | |
}); | |
this.repl.inject({oled: oled}); | |
oled.fillRect(1, 1, 10, 20, 1); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment