diff --git a/examples/hello/hello.js b/examples/hello/hello.js index 8c99651..26a1d37 100644 --- a/examples/hello/hello.js +++ b/examples/hello/hello.js @@ -4,15 +4,17 @@ Cylon.robot({ connection: { name: 'loopback', adaptor: 'loopback' }, device: { name: 'ping', driver: 'ping' }, - commands: ['test'], - - test: function(greeting) { - return greeting + " world"; - }, - work: function() { - every((60).seconds(), console.log); + every((1).seconds(), function(){ + console.log("Hello, human!") + }); + + after((5).seconds(), function(){ + console.log("I've been at your command for 5 seconds now.") + }); } }); +//Cylon.api({host: '0.0.0.0', port: '3005'}) + Cylon.start(); diff --git a/examples/hello/hello.markdown b/examples/hello/hello.markdown index 4628409..96efd6f 100644 --- a/examples/hello/hello.markdown +++ b/examples/hello/hello.markdown @@ -20,8 +20,9 @@ message after ten seconds have elapsed. console.log("Hello, human!") }); - after((10).seconds(), function() { - console.log "Impressive." + // This will happen only one time at the 5th second + after((5).seconds(), function() { + console.log("I've been at your command for 5 seconds now.") }); }