1.1.0 • Published 6 years ago

@p4d/find-port v1.1.0

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

Socket Logs

Description

Small NPM package that finds ports based on manufacturer (or other parameters soon...)

Installation

npm install --save @p4d/find-port

Usage

Require package

	const findPort = require('@p4d/find-port')

Find the port by manufacturer

var port = findPort.byManufacturer('Arduino_Srl')
if (!port) {
	console.log('[error] Unable to find arduino')
}

Use the port as you wish!

port.on('data', function (data) {
	console.log('[arduino] Received data: ', data);
})

Future updates

Ports should be able to be found by other parameters.

Logs are currently printed on the console, may be worth exploring logging to a specific file or somewhere else