Skip to content

Giaco9/serial-arduino-detect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

module for detect arduino board via USB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published