Skip to content

Latest commit

 

History

History
24 lines (23 loc) · 782 Bytes

README.md

File metadata and controls

24 lines (23 loc) · 782 Bytes

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.