Skip to content

a node-serialport implementation using a UDP/dgram client for sending and receiving serial data.

Notifications You must be signed in to change notification settings

monteslu/udp-serial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

udp-serial

A virtual node-serialport implementation that uses UDP/dgram as the transport.

Installation

npm install udp-serial

UDPSerialPort

Use UDP/dgram to send/receive data to a remote physical device:

'use strict';

var VirtualSerialPort = require('udp-serial').SerialPort;
var firmata = require('firmata');

//create the udp serialport and specify the host and port to connect to
var sp = new VirtualSerialPort({
  host: 'localhost',
  type: 'udp4',
  port: 41234
});

//use the serial port to send a command to a remote firmata(arduino) device
var board = new firmata.Board(sp);
board.on('ready', function(){
  console.log('actually connected to an arduino!');
  board.digitalWrite(13, 1);
});

About

a node-serialport implementation using a UDP/dgram client for sending and receiving serial data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published