0.1.1 • Published 9 years ago

serial-arduino-detect v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

serial-arduino-detect

This simple module was heavily inspired from Jhonny-Five and is used with serialPort for autodetect Arduino board attach via USB.

installation

npm install -S serial-arduino-detect

Quick example

com = require('serialport');
let board = new Board(com);
board.detect(function(err, port){
  if(err) {
    console.error('Arduino do not found');
  } else {
    console.log('see serialPort documentation');
  }
});

For search a board you just need to create a new Board with serialPort object, call detect method and passing a callback. This will be fire with err object or a port where Arduino was found.