Skip to content

Instantly share code, notes, and snippets.

@ralphtheninja
Last active June 24, 2017 22:59
Show Gist options
  • Save ralphtheninja/8171c825d8d143a9f3e0056ab4461ec0 to your computer and use it in GitHub Desktop.
Save ralphtheninja/8171c825d8d143a9f3e0056ab4461ec0 to your computer and use it in GitHub Desktop.
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
}
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