Created
July 25, 2015 07:32
-
-
Save CaptEmulation/31c8049469200ea4c6db to your computer and use it in GitHub Desktop.
Johnny-five parallel 16x2 LCD example
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
// For interfacing with Arduino | |
var five = require("johnny-five"); | |
// Initialize a new Johnny-Five board | |
var board = new five.Board({ | |
port: 'COM11' // or whatever-- auto detection is sometimes finicky for me | |
}); | |
board.on("ready", function() { | |
var lcd = new five.LCD({ | |
pins: [7, 8, 9, 10, 11, 12], | |
rows: 2, | |
cols: 16 | |
}); | |
lcd.setCursor(5, 0); | |
lcd.print("Hello"); | |
lcd.setCursor(2, 1); | |
lcd.print("johnny-five"); | |
this.repl.inject({ | |
lcd: lcd | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment