How to use the avrgirl-arduino.listKnownBoards function in avrgirl-arduino

To help you get started, we’ve selected a few avrgirl-arduino examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github noopkat / firmata-party / bin / firmata-party.js View on Github external
boolean: ['party', 'debug', 'help']
});
var fs = require('fs');

var debugMode = argv.debug;
var partyMode = argv.party;
var helpMsg = `usage: firmata-party [ | ] [--party] [--debug]

firmata-party list # list all supported boards
firmata-party uno # flash Standard Firmata to an Arduino Uno
firmata-party uno --debug # show debug info
firmata-party uno --party # keep flashing firmata on new arduinos until you quit the program with ctrl+c!
firmata-party help # show usage info
`;

var supportedBoards = Avrgirl.listKnownBoards();
var supportedBoardsString = supportedBoards.join(', ');

function showHelp() {
  console.log(helpMsg);
}

function showSupported() {
  console.log('supported board flags: \n' + supportedBoardsString);
}

handleArgs(argv);

function handleArgs(argv) {
  var board = argv._[0];
  var args = argv._;
  if (!argv || args.length == 0 || args.indexOf('help') > -1 || args.indexOf('man') > -1) {

avrgirl-arduino

A NodeJS library for flashing compiled sketch files to Arduino microcontroller boards.

MIT
Latest version published 4 years ago

Package Health Score

54 / 100
Full package analysis

Popular avrgirl-arduino functions