Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

serialport

Package Overview
Dependencies
Maintainers
1
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serialport - npm Package Compare versions

Comparing version 0.7.3 to 0.7.4

binding.gyp

12

package.json
{ "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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc