Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/octoblu/meshblu-virtual-serial
Virtual serial port running on top of Meshblu
https://github.com/octoblu/meshblu-virtual-serial
Last synced: 25 days ago
JSON representation
Virtual serial port running on top of Meshblu
- Host: GitHub
- URL: https://github.com/octoblu/meshblu-virtual-serial
- Owner: octoblu
- License: mit
- Created: 2014-02-17T03:35:17.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-11-30T19:10:30.000Z (about 9 years ago)
- Last Synced: 2024-12-21T12:35:53.452Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 21.5 KB
- Stars: 5
- Watchers: 21
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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:
```js
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 devicevar 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:
```js
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);
});```