Hello in both javascript and coffeescript

This commit is contained in:
deadprogram 2013-10-22 23:32:41 -07:00
parent 132282d4c2
commit a46a8c4a71
2 changed files with 10 additions and 6 deletions

8
examples/hello.coffee Normal file
View File

@ -0,0 +1,8 @@
cylon = require('..')
cylon.robot
work: ->
every 1.second(), ->
Logger.info("hello, human!")
.start()

View File

@ -1,11 +1,7 @@
var cylon = require('..'); var cylon = require('..');
// Initialize the robot cylon.robot({
var robot = cylon.robot({
work: function() { work: function() {
every((1).second(), function() { Logger.info("hello, human!"); }); every((1).second(), function() { Logger.info("hello, human!"); });
} }
}); }).start();
// start working
robot.start();