serialport
Advanced tools
Comparing version 0.7.3 to 0.7.4
{ "name" : "serialport", | ||
"version" : "0.7.3", | ||
"version" : "0.7.4", | ||
"description" : "Welcome your robotic javascript overlords. Better yet, program them!", | ||
@@ -10,5 +10,9 @@ "author": "Chris Williams <voodootikigod@gmail.com>", | ||
}, | ||
"scripts": { "install": "cd serialport_native;node-waf configure build;cp build/Release/serialport_native.node ../" }, | ||
"engines": { "node": "0.6" } | ||
"scripts": { | ||
"install": "node-waf configure build" | ||
}, | ||
"dependencies": { | ||
"bindings": "*" | ||
}, | ||
"engines": { "node": ">= 0.6.0" } | ||
} |
@@ -23,2 +23,14 @@ <pre> | ||
Robots, you say? | ||
================ | ||
This library is admittedly a base level toolkit for building amazing things with real world (including robots). Here are a couple of those amazing things that leverage node-serialport: | ||
* [firmata](https://github.com/jgautier/firmata) Talk natively to Arduino using the firmata protocol. | ||
* [tmpad](http://tmpvar.com/project/tmpad/) [source](https://github.com/tmpvar/tmpad) - a DIY midi pad using infrared, arduino, and nodejs. [Video](http://vimeo.com/34575470) | ||
* [duino](https://github.com/ecto/duino) - A higher level framework for working with Arduinos in node.js. | ||
* [Arduino Drinking Game Extravaganza](http://jsconf.eu/2011/arduino_drinking_game_extravaganza.html) - AKA "The Russian" a hexidecimal drinking game for geeks by Uxebu presented at JSConf EU 2011. | ||
* [Arduino controlling popcorn.js](https://gist.github.com/968773) - Controlling a popcorn.js video with an Arduino kit. | ||
* [Robotic JavaScript](http://jsconf.eu/2010/speaker/livingroombindmotion_function.html) - The first live presentation of the node-serialport code set as presented at JSConf EU 2010. | ||
How To Use | ||
@@ -25,0 +37,0 @@ ========== |
@@ -11,6 +11,6 @@ "use strict"; | ||
var net = require('net'); | ||
var serialport_native = require('./serialport_native'); | ||
var serialport_native = require('bindings')('serialport_native.node'); | ||
var IOWatcher = process.binding('io_watcher').IOWatcher; | ||
var BAUDRATES = [115200, 57600, 38400, 19200, 9600, 4800, 2400, 1800, 1200, 600, 300, 200, 150, 134, 110, 75, 50]; | ||
var BAUDRATES = [500000, 230400, 115200, 57600, 38400, 19200, 9600, 4800, 2400, 1800, 1200, 600, 300, 200, 150, 134, 110, 75, 50]; | ||
var DATABITS = [8, 7, 6, 5]; | ||
@@ -81,2 +81,7 @@ var STOPBITS = [1, 2]; | ||
this.readStream = fs.createReadStream(this.port,{bufferSize:options.buffersize}); | ||
var openCallback = ( function (me) { | ||
return (function (fd) { | ||
me.emit("open",fd); | ||
}); | ||
})(this); | ||
var dataCallback = (function (me) { | ||
@@ -102,2 +107,3 @@ return (function (buffer) { | ||
})(this); | ||
this.readStream.on("open", openCallback); | ||
this.readStream.on("data", dataCallback); | ||
@@ -104,0 +110,0 @@ this.readStream.on("error", errorCallback); |
// To test with a z-wave device, I recommend: http://www.aeon-labs.com/site/products/view/2/ | ||
var SerialPort = require("../serialport").SerialPort; | ||
var sys = require("sys"); | ||
var util = require('util'); | ||
var serial_port = new SerialPort("/dev/ttyUSB0"); | ||
serial_port.write(new Buffer([0x01, 0x03, 0x00, 0x20,220])); | ||
sys.puts("write"); | ||
util.puts("write"); | ||
serial_port.read(); | ||
/* | ||
serial_port.on("data", function(d){ | ||
sys.puts("here"); | ||
sys.puts(d); | ||
util.puts("here"); | ||
util.puts(d); | ||
serial_port.close(); | ||
@@ -15,0 +15,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
145166
28
247
113
1
1
1
2
3
+ Addedbindings@*
+ Addedbindings@1.5.0(transitive)
+ Addedfile-uri-to-path@1.0.0(transitive)