forked from firmata/firmata.js
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
205 additions
and
200 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
.DS_Store |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,18 @@ | ||
{ "name" : "firmata" | ||
, "description" : "A library to control an arduino running firmata" | ||
, "version" : "0.1.3" | ||
, "author" : "Julian Gautier" | ||
, "homepage" : "http://www.github.com/jgautier/firmata" | ||
, "repository" : | ||
{ | ||
"type" : "git" | ||
,"url" : "git://github.com/jgautier/firmata.git" | ||
} | ||
, "main" : "lib/firmata" | ||
, "bin" : | ||
{ | ||
"firmata" : "./repl.js" | ||
} | ||
, "dependencies" : | ||
{ | ||
"serialport" : ">=0.2.0" | ||
} | ||
, "engines" : | ||
{ | ||
"node" : "v0.5.0-pre" | ||
} | ||
|
||
} | ||
{ | ||
"name": "firmata", | ||
"description": "A library to control an arduino running firmata", | ||
"version": "0.1.3", | ||
"author": "Julian Gautier", | ||
"homepage": "http://www.github.com/jgautier/firmata", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/jgautier/firmata.git" | ||
}, | ||
"main": "lib/firmata", | ||
"bin": { | ||
"firmata": "./repl.js" | ||
}, | ||
"dependencies": { | ||
"serialport": ">=0.2.0" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
#!/usr/bin/env node | ||
var firmata=require('./lib/firmata.js') | ||
,repl = require('repl'); | ||
|
||
var firmata = require('./lib/firmata.js'), | ||
repl = require('repl'); | ||
console.log('Enter USB Port and press enter:'); | ||
process.stdin.resume(); | ||
process.stdin.setEncoding('utf8'); | ||
process.stdin.once('data',function(chunk){ | ||
var port = chunk.replace('\n',''); | ||
var board = new firmata.Board(port,function(){ | ||
console.log('Successfully Connected to ')+port; | ||
repl.start('firmata>').context.board=board; | ||
process.stdin.once('data', function(chunk) { | ||
var port = chunk.replace('\n', ''); | ||
var board = new firmata.Board(port, function() { | ||
console.log('Successfully Connected to ' + port); | ||
repl.start('firmata>').context.board = board; | ||
}); | ||
}); |
Oops, something went wrong.