control roomba from node.js
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples initial commit Jul 23, 2013


Control your Roomba robot using it's onboard serial interface


You must have a serial connection to Roomba's serial interface (exposed via the mini-din connector at 5v TTL signal levels). The Roomba speaks a protocol called Create Open Interface (formerly ROI) described here.


var Roomba = require('../roomba.js').Roomba

var bot = new Roomba({
    sp: { path: '/dev/ttyAMA0', options: { baudrate: 57600 }},
    update_freq: 200

bot.once('ready', function () {
	console.log('spinning up');
	bot.send({ cmd: 'DRIVE', data: [500, -1] });

bot.on('sense', function (sensors) {
	if (sensors.bump.right || sensors.bump.left) {
		console.log('bump detected');
		// stop spinning
		bot.send({ cmd: 'DRIVE', data: [0, -1] });


see issues.