Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var five = require('johnny-five');
var keypress = require('keypress');
var board = new five.Board({port:"/dev/tty/AdafruitEZ-Link6b34-SPP"});
board.on('ready', function() {
console.log('Welcome to Sumobot!');
console.log('Control the bot with the arrow keys, and SPACE to stop.');
var servoL = new five.Servo.Continuous(9);
var servoR = new five.Servo.Continuous(10);
keypress(process.stdin);
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.setRawMode(true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.