Created
December 2, 2013 22:35
-
-
Save rwaldron/7760342 to your computer and use it in GitHub Desktop.
Johnny-Five compared to Cylon: Hello
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cylon = require '../..' | |
Cylon.robot | |
work: -> | |
every 1.second(), -> | |
Logger.info("Hello, human!") | |
after 10.seconds(), -> | |
Logger.info "Impressive." | |
.start() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Cylon = require('../..'); | |
Cylon.robot({ | |
work: function() { | |
every(1..second(), function() { Logger.info("Hello, human!"); }); | |
after(10..seconds(), function() { Logger.info("Impressive."); }); | |
} | |
}).start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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