Last active
June 24, 2017 22:59
-
-
Save ralphtheninja/8171c825d8d143a9f3e0056ab4461ec0 to your computer and use it in GitHub Desktop.
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
function createBot () { | |
var board = new five.Board() | |
var oled | |
board.on('ready', function () { | |
console.log('Connected to Arduino, ready.') | |
// I2C va USB | |
var opts = { | |
width: 128, | |
height: 64, | |
address: 0x3C | |
} | |
oled = new Oled(board, five, opts) | |
}) | |
board.woohoo = function () { | |
oled.whatever() | |
} | |
return board | |
} |
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
function createBot () { | |
var board = new five.Board() | |
var oled | |
board.on('ready', function () { | |
console.log('Connected to Arduino, ready.') | |
// I2C va USB | |
var opts = { | |
width: 128, | |
height: 64, | |
address: 0x3C | |
} | |
oled = new Oled(board, five, opts) | |
}) | |
return { | |
board: board, | |
woohoo: function () { | |
oled.whatever() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment