This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ximport five from 'johnny-five'; | |
import keypress from 'keypress'; | |
const board = new five.Board({port: '/dev/cu.NODEBOT_BETA-DevB'}); | |
keypress(process.stdin); | |
process.stdin.setRawMode(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let EtherPort = require('etherport'); | |
let five = require('johnny-five'); | |
let boardsConfig = [ | |
{ id: 'NodeMCU', port: new EtherPort(3030), timeout: 30000 }, //WiFiFirmata | |
{ id: 'EtherShield', port: new EtherPort(3031), timeout: 30000 } //EthernetFirmata | |
]; | |
let boards = new five.Boards(boardsConfig); | |
boards.on('ready', function() { |