1.3.0 • Published 8 years ago

skynet-serial v1.3.0

Weekly downloads
21
License
MIT
Repository
github
Last release
8 years ago

meshblu-virtual-serial

Virtual serial port running on top of meshblu (formerly skynet.im)

#Use with Remote-IO!

https://github.com/monteslu/remote-io

MeshbluSerialPort

Use skynet to message a physical remote serial device:

var MeshbluSerialPort = require('skynet-serial').SerialPort;
var meshblu = require('meshblu');

// setup variables for myId, token, sendId
// the sendId is for the uuid of the physical serial device

var conn = meshblu.createConnection({
  uuid: myId,
  token: token
});

conn.on('ready', function(data){
  var serialPort = new MeshbluSerialPort(conn, sendId);
  var board = new firmata.Board(serialPort, function (err, ok) {
    if (err){ throw err; }
    //light up a pin
    board.digitalWrite(13, 1);
  });
});

bindPhysical

Bind a physical serial port to recieve/push data from skynet:

var SerialPort = require('serialport').SerialPort;
var bindPhysical = require('skynet-serial').bindPhysical;
var meshblu = require('meshblu');

// setup variables for myId, token, sendId
// the sendId should be for the uuid of the MeshbluSerialPort app.

var conn = meshblu.createConnection({
  uuid: myId,
  token: token
});

conn.on('ready', function(data){
  var serialPort = new SerialPort('/dev/tty.usbmodem1411',{
      baudrate: 57600,
      buffersize: 1
  });
  bindPhysical(serialPort, conn);
});
1.3.0

8 years ago

1.2.0

8 years ago

0.14.0

9 years ago

0.13.0

9 years ago

0.12.0

10 years ago

0.10.0

10 years ago

0.9.0

10 years ago

0.8.0

10 years ago

0.6.0

10 years ago

0.5.0

10 years ago

0.4.0

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago