Skip to content

Instantly share code, notes, and snippets.

@rwaldron
Created December 2, 2013 22:35
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rwaldron/7760342 to your computer and use it in GitHub Desktop.
Save rwaldron/7760342 to your computer and use it in GitHub Desktop.
Johnny-Five compared to Cylon: Hello
Cylon = require '../..'
Cylon.robot
work: ->
every 1.second(), ->
Logger.info("Hello, human!")
after 10.seconds(), ->
Logger.info "Impressive."
.start()
var Cylon = require('../..');
Cylon.robot({
work: function() {
every(1..second(), function() { Logger.info("Hello, human!"); });
after(10..seconds(), function() { Logger.info("Impressive."); });
}
}).start();
var five = require("johnny-five");
var temporal = require("temporal");
(new five.Board()).on("ready", function() {
temporal.loop(1000, function() { console.log("Hello, Dave"); });
temporal.loop(10000, function() { console.log("Hello, Dave"); });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment