Skip to content

Instantly share code, notes, and snippets.

@chefguevara
chefguevara / tank
Created August 18, 2017 00:41
tank
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);
@chefguevara
chefguevara / gist:4e1ddfaec97b15a59f66a249b970394c
Created July 6, 2017 00:07
Johnny-five multiple remote boards
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() {