hybridgroup/cylon-sphero

View on GitHub
examples/basic/fluent-basic.js

Summary

Maintainability
A
40 mins
Test Coverage
"use strict";

var Cylon = require("cylon");

Cylon
  .robot()
  .connection("sphero", { adaptor: "sphero", port: "/dev/rfcomm0" })
  .device("sphero", { driver: "sphero" })
  .on("ready", function(bot) {
    setInterval(function() {
      bot.sphero.roll(60, Math.floor(Math.random() * 360));
    }, 1000);
  });

Cylon.start();