diff --git a/examples/analog_sensor/analog_sensor.coffee b/examples/analog_sensor/analog_sensor.coffee index 95db9af..9f0128f 100644 --- a/examples/analog_sensor/analog_sensor.coffee +++ b/examples/analog_sensor/analog_sensor.coffee @@ -15,9 +15,9 @@ Cylon.robot work: (my) -> my.sensor.on 'upperLimit', (val) -> - Logger.info "Upper limit reached ===> #{val}" + console.log "Upper limit reached ===> #{val}" my.sensor.on 'lowerLimit', (val) -> - Logger.info "Lower limit reached ===> #{val}" + console.log "Lower limit reached ===> #{val}" .start() diff --git a/examples/analog_sensor/analog_sensor.js b/examples/analog_sensor/analog_sensor.js index c41a965..4aa8f83 100644 --- a/examples/analog_sensor/analog_sensor.js +++ b/examples/analog_sensor/analog_sensor.js @@ -17,11 +17,11 @@ Cylon.robot({ work: function(my) { my.sensor.on('upperLimit', function(val) { - Logger.info("Upper limit reached ===> " + val); + console.log("Upper limit reached ===> " + val); }); my.sensor.on('lowerLimit', function(val) { - Logger.info("Lower limit reached ===> " + val); + console.log("Lower limit reached ===> " + val); }); } diff --git a/examples/analog_sensor/analog_sensor.litcoffee b/examples/analog_sensor/analog_sensor.litcoffee index 2777d6c..5eab962 100644 --- a/examples/analog_sensor/analog_sensor.litcoffee +++ b/examples/analog_sensor/analog_sensor.litcoffee @@ -36,10 +36,10 @@ tell it what work we want to do: work: (my) -> my.sensor.on 'upperLimit', (val) -> - Logger.info "Upper limit reached: #{val}" + console.log "Upper limit reached: #{val}" my.sensor.on 'lowerLimit', (val) -> - Logger.info "Lower limit reached: #{val}" + console.log "Lower limit reached: #{val}" Now that our robot knows what work to do, and the work it will be doing that hardware with, we can start it: diff --git a/examples/api/api.coffee b/examples/api/api.coffee index 436d3bd..4177011 100644 --- a/examples/api/api.coffee +++ b/examples/api/api.coffee @@ -14,7 +14,7 @@ SpheroRobot = work: (my) -> every 1.seconds(), -> - Logger.info my.name + console.log my.name my.sphero.setRGB Math.floor(Math.random() * 100000) my.sphero.roll 60, Math.floor(Math.random() * 360) diff --git a/examples/api/api.js b/examples/api/api.js index 46e1517..1e38655 100644 --- a/examples/api/api.js +++ b/examples/api/api.js @@ -14,7 +14,7 @@ var SpheroRobot = { work: function(my) { every((1).seconds(), function() { - Logger.info(my.name); + console.log(my.name); my.sphero.setRandomColor(); my.sphero.roll(60, Math.floor(Math.random() * 360)); }); diff --git a/examples/api/api.litcoffee b/examples/api/api.litcoffee index a7d2705..d5c382d 100644 --- a/examples/api/api.litcoffee +++ b/examples/api/api.litcoffee @@ -46,7 +46,7 @@ roll in a random direction. work: (my) -> every 1.seconds(), -> - Logger.info my.name + console.log my.name my.sphero.setRandomColor() my.sphero.roll 60, Math.floor(Math.random() * 360) diff --git a/examples/beaglebone/bbb_servo.coffee b/examples/beaglebone/bbb_servo.coffee index 65df378..b4ca490 100644 --- a/examples/beaglebone/bbb_servo.coffee +++ b/examples/beaglebone/bbb_servo.coffee @@ -28,7 +28,7 @@ Cylon.robot angle += increment my.servo.angle angle - Logger.info "Current Angle: #{my.servo.currentAngle()}" + console.log "Current Angle: #{my.servo.currentAngle()}" increment = -increment if (angle is 30) or (angle is 150) diff --git a/examples/blinkm/blinkm.coffee b/examples/blinkm/blinkm.coffee index a5b2c68..e6e4812 100644 --- a/examples/blinkm/blinkm.coffee +++ b/examples/blinkm/blinkm.coffee @@ -8,7 +8,7 @@ Cylon.robot work: (my) -> my.blinkm.on 'start', -> my.blinkm.version (version) -> - Logger.info "Started BlinkM version #{version}" + console.log "Started BlinkM version #{version}" my.blinkm.off() lit = false @@ -16,11 +16,11 @@ Cylon.robot every 1.second(), -> if lit lit = false - Logger.info 'on' + console.log 'on' my.blinkm.rgb 0xaa, 0, 0 else lit = true - Logger.info 'off' + console.log 'off' my.blinkm.rgb 0, 0, 0 .start() diff --git a/examples/blinkm/blinkm.js b/examples/blinkm/blinkm.js index b4b0d65..f3677ec 100644 --- a/examples/blinkm/blinkm.js +++ b/examples/blinkm/blinkm.js @@ -8,7 +8,7 @@ Cylon.robot({ work: function(my) { my.blinkm.on('start', function() { my.blinkm.version(function(version) { - Logger.info("Started BlinkM version " + version); + console.log("Started BlinkM version " + version); }); my.blinkm.off(); @@ -18,11 +18,11 @@ Cylon.robot({ every((1).second(), function() { if (lit) { lit = false; - Logger.info('on'); + console.log('on'); my.blinkm.rgb(0xaa, 0, 0); } else { lit = true; - Logger.info('off'); + console.log('off'); my.blinkm.rgb(0, 0, 0); } }); diff --git a/examples/blinkm/blinkm.litcoffee b/examples/blinkm/blinkm.litcoffee index 086b941..8bee395 100644 --- a/examples/blinkm/blinkm.litcoffee +++ b/examples/blinkm/blinkm.litcoffee @@ -32,7 +32,7 @@ When the BlinkM sends the 'start' event, we'll set up our events We'll request the BlinkM's version, and print that to the console: my.blinkm.version (version) -> - Logger.info "Started BlinkM version #{version}" + console.log "Started BlinkM version #{version}" By default, we'll turn the LED off and assign a boolean that we'll use to determine if it's on or not: @@ -46,11 +46,11 @@ which state we need to transition the BlinkM to: every 1.second(), -> if lit lit = false - Logger.info 'on' + console.log 'on' my.blinkm.rgb 0xaa, 0, 0 else lit = true - Logger.info 'off' + console.log 'off' my.blinkm.rgb 0, 0, 0 Now that our robot knows what to do, let's get started: diff --git a/examples/conway_sphero/conway_sphero.coffee b/examples/conway_sphero/conway_sphero.coffee index d1adcb4..1c363b8 100644 --- a/examples/conway_sphero/conway_sphero.coffee +++ b/examples/conway_sphero/conway_sphero.coffee @@ -38,7 +38,7 @@ class ConwayRobot birthday: -> @age += 1 - Logger.info "Happy birthday, #{@name}. You are #{@age} and had #{@contacts} contacts." + console.log "Happy birthday, #{@name}. You are #{@age} and had #{@contacts} contacts." if @enoughContacts() @rebirth() if not @alive? diff --git a/examples/conway_sphero/conway_sphero.js b/examples/conway_sphero/conway_sphero.js index 31f6180..6a9e1ef 100644 --- a/examples/conway_sphero/conway_sphero.js +++ b/examples/conway_sphero/conway_sphero.js @@ -51,7 +51,7 @@ var ConwayRobot = (function() { ConwayRobot.prototype.birthday = function() { this.age += 1; - Logger.info("Happy birthday, " + this.name + ". You are " + this.age + " and had " + this.contacts + " contacts."); + console.log("Happy birthday, " + this.name + ". You are " + this.age + " and had " + this.contacts + " contacts."); if (this.enoughContacts()) { if (this.alive == null) { this.rebirth(); } diff --git a/examples/conway_sphero/conway_sphero.litcoffee b/examples/conway_sphero/conway_sphero.litcoffee index 2f1fea1..744c95e 100644 --- a/examples/conway_sphero/conway_sphero.litcoffee +++ b/examples/conway_sphero/conway_sphero.litcoffee @@ -101,7 +101,7 @@ the number of contacts it had in the last tick. birthday: -> @age += 1 - Logger.info "Happy birthday, #{@name}. You are #{@age} and had #{@contacts} contacts." + console.log "Happy birthday, #{@name}. You are #{@age} and had #{@contacts} contacts." if @enoughContacts() @rebirth() if not @alive? diff --git a/examples/drone_nav/drone_nav.coffee b/examples/drone_nav/drone_nav.coffee index 232c0f7..549b6bc 100644 --- a/examples/drone_nav/drone_nav.coffee +++ b/examples/drone_nav/drone_nav.coffee @@ -11,6 +11,6 @@ Cylon.robot work: (my) -> my.drone.config 'general:navdata_demo', 'TRUE' - my.nav.on 'update', (data) -> Logger.info data + my.nav.on 'update', (data) -> console.log data .start() diff --git a/examples/drone_nav/drone_nav.js b/examples/drone_nav/drone_nav.js index ebebde3..bc8bc7b 100644 --- a/examples/drone_nav/drone_nav.js +++ b/examples/drone_nav/drone_nav.js @@ -9,6 +9,6 @@ Cylon.robot({ work: function(my) { my.drone.config('general:navdata_demo', 'TRUE'); - my.nav.on('update', function(data) { Logger.info(data); }); + my.nav.on('update', function(data) { console.log(data); }); } }).start(); diff --git a/examples/drone_nav/drone_nav.litcoffee b/examples/drone_nav/drone_nav.litcoffee index c75bf05..48b95ab 100644 --- a/examples/drone_nav/drone_nav.litcoffee +++ b/examples/drone_nav/drone_nav.litcoffee @@ -32,7 +32,7 @@ drone's config, and log data to the console whenever the nav board emits the work: (my) -> my.drone.config 'general:navdata_demo', 'TRUE' - my.nav.on 'update', (data) -> Logger.info data + my.nav.on 'update', (data) -> console.log data Simple enough. Now all that's left is to start the robot: diff --git a/examples/hello/hello.coffee b/examples/hello/hello.coffee index 6faefa1..b619fc8 100644 --- a/examples/hello/hello.coffee +++ b/examples/hello/hello.coffee @@ -3,9 +3,9 @@ Cylon = require '../..' Cylon.robot work: -> every 1.second(), -> - Logger.info("Hello, human!") + console.log("Hello, human!") after 10.seconds(), -> - Logger.info "Impressive." + console.log "Impressive." .start() diff --git a/examples/hello/hello.js b/examples/hello/hello.js index 7c2ab85..310d0e4 100644 --- a/examples/hello/hello.js +++ b/examples/hello/hello.js @@ -2,7 +2,7 @@ var Cylon = require('../..'); Cylon.robot({ work: function() { - every(1..second(), function() { Logger.info("Hello, human!"); }); - after(10..seconds(), function() { Logger.info("Impressive."); }); + every(1..second(), function() { console.log("Hello, human!"); }); + after(10..seconds(), function() { console.log("Impressive."); }); } }).start(); diff --git a/examples/hello/hello.litcoffee b/examples/hello/hello.litcoffee index 238c893..468abcb 100644 --- a/examples/hello/hello.litcoffee +++ b/examples/hello/hello.litcoffee @@ -17,10 +17,10 @@ message after ten seconds have elapsed. work: -> every 1.second(), -> - Logger.info("Hello, human!") + console.log("Hello, human!") after 10.seconds(), -> - Logger.info "Impressive." + console.log "Impressive." Simple as can be. Now that we're done, let's start the robot: diff --git a/examples/master/master.coffee b/examples/master/master.coffee index 3504b46..73d0a54 100644 --- a/examples/master/master.coffee +++ b/examples/master/master.coffee @@ -10,7 +10,7 @@ class SpheroRobot connection: { name: 'Sphero', adaptor: 'sphero' } work: (my) -> - Logger.info "Robot #{my.name} is now working!" + console.log "Robot #{my.name} is now working!" for bot in bots robot = new SpheroRobot diff --git a/examples/master/master.js b/examples/master/master.js index cab7ec3..00769a8 100644 --- a/examples/master/master.js +++ b/examples/master/master.js @@ -12,7 +12,7 @@ var SpheroRobot = (function() { SpheroRobot.prototype.connection = { name: 'Sphero', adaptor: 'sphero' }; SpheroRobot.prototype.work = function(my) { - Logger.info("Robot " + my.name + " is now working!"); + console.log("Robot " + my.name + " is now working!"); }; return SpheroRobot; diff --git a/examples/master/master.litcoffee b/examples/master/master.litcoffee index 1b10b92..4c3fa12 100644 --- a/examples/master/master.litcoffee +++ b/examples/master/master.litcoffee @@ -38,7 +38,7 @@ We'll just give our robots some basic work so we can tell they're actually working: work: (my) -> - Logger.info "Robot #{my.name} is now working!" + console.log "Robot #{my.name} is now working!" And that's all we need for that. diff --git a/examples/motor/motor.coffee b/examples/motor/motor.coffee index ed50237..1a73c8f 100644 --- a/examples/motor/motor.coffee +++ b/examples/motor/motor.coffee @@ -11,7 +11,7 @@ Cylon.robot every 0.05.seconds(), -> speed += increment my.motor.speed(speed) - Logger.info "Current Speed: #{my.motor.currentSpeed() }" + console.log "Current Speed: #{my.motor.currentSpeed() }" increment = -increment if (speed is 0) or (speed is 255) .start() diff --git a/examples/motor/motor.js b/examples/motor/motor.js index 6680179..8e5f2b3 100644 --- a/examples/motor/motor.js +++ b/examples/motor/motor.js @@ -12,7 +12,7 @@ Cylon.robot({ speed += increment; my.motor.speed(speed); - Logger.info("Current Speed: " + (my.motor.currentSpeed())); + console.log("Current Speed: " + (my.motor.currentSpeed())); if ((speed === 0) || (speed === 255)) { increment = -increment; } }); diff --git a/examples/motor/motor.litcoffee b/examples/motor/motor.litcoffee index 1832b74..6b19c77 100644 --- a/examples/motor/motor.litcoffee +++ b/examples/motor/motor.litcoffee @@ -38,7 +38,7 @@ values supported: every 0.05.seconds(), -> speed += increment my.motor.speed(speed) - Logger.info "Current Speed: #{my.motor.currentSpeed() }" + console.log "Current Speed: #{my.motor.currentSpeed() }" increment = -increment if (speed is 0) or (speed is 255) And with all that done, we can now start our robot: diff --git a/examples/raspi_servo/raspi_servo.coffee b/examples/raspi_servo/raspi_servo.coffee index e072d0b..bd72323 100644 --- a/examples/raspi_servo/raspi_servo.coffee +++ b/examples/raspi_servo/raspi_servo.coffee @@ -13,7 +13,7 @@ Cylon.robot angle += increment my.servo.angle angle - Logger.info "Current Angle: #{my.servo.currentAngle()}" + console.log "Current Angle: #{my.servo.currentAngle()}" increment = -increment if (angle is 30) or (angle is 150) diff --git a/examples/raspi_servo/raspi_servo.js b/examples/raspi_servo/raspi_servo.js index 7ed60a4..6ffd16c 100644 --- a/examples/raspi_servo/raspi_servo.js +++ b/examples/raspi_servo/raspi_servo.js @@ -11,7 +11,7 @@ Cylon.robot({ every(1..seconds(), function() { angle += increment; my.servo.angle(angle); - Logger.info("Current Angle: " + (my.servo.currentAngle())); + console.log("Current Angle: " + (my.servo.currentAngle())); if ((angle === 30) || (angle === 150)) { increment = -increment; } }); } diff --git a/examples/raspi_servo/raspi_servo.litcoffee b/examples/raspi_servo/raspi_servo.litcoffee index 43c4b30..84196e4 100644 --- a/examples/raspi_servo/raspi_servo.litcoffee +++ b/examples/raspi_servo/raspi_servo.litcoffee @@ -39,7 +39,7 @@ supported: angle += increment my.servo.angle(angle) - Logger.info "Current angle: #{my.servo.currentAngle() }" + console.log "Current angle: #{my.servo.currentAngle() }" increment = -increment if (angle is 30) or (angle is 150) diff --git a/examples/robot_commands/robot_commands.coffee b/examples/robot_commands/robot_commands.coffee index e870cc2..7e2e96f 100644 --- a/examples/robot_commands/robot_commands.coffee +++ b/examples/robot_commands/robot_commands.coffee @@ -10,7 +10,7 @@ class MyRobot work: (me) -> every 1.seconds(), -> - Logger.info me.name + console.log me.name robot = new MyRobot robot.name = "frankie" diff --git a/examples/robot_commands/robot_commands.js b/examples/robot_commands/robot_commands.js index aadd13c..b7adf40 100644 --- a/examples/robot_commands/robot_commands.js +++ b/examples/robot_commands/robot_commands.js @@ -13,7 +13,7 @@ var MyRobot = (function() { MyRobot.prototype.work = function(me) { every((1).seconds(), function() { - Logger.info(me.name); + console.log(me.name); }); }; diff --git a/examples/robot_commands/robot_commands.litcoffee b/examples/robot_commands/robot_commands.litcoffee index 0e03530..e36b92c 100644 --- a/examples/robot_commands/robot_commands.litcoffee +++ b/examples/robot_commands/robot_commands.litcoffee @@ -38,7 +38,7 @@ busy, we'll just tell it to print it's name every second. work: (me) -> every 1.seconds(), -> - Logger.info me.name + console.log me.name And with that all done, we can now instantiate our robot: diff --git a/examples/salesforce/salesforce.coffee b/examples/salesforce/salesforce.coffee index ff8753d..605e04c 100644 --- a/examples/salesforce/salesforce.coffee +++ b/examples/salesforce/salesforce.coffee @@ -20,7 +20,7 @@ Cylon.robot msg += "Bucks: #{data.sobject.Bucks__c}," msg += "SM_Id: #{data.sobject.Id}" - Logger.info msg + console.log msg i = 0 diff --git a/examples/salesforce/salesforce.js b/examples/salesforce/salesforce.js index 776d9fd..0238a19 100644 --- a/examples/salesforce/salesforce.js +++ b/examples/salesforce/salesforce.js @@ -22,7 +22,7 @@ Cylon.robot({ msg += "Bucks: " + data.sobject.Bucks__c + ","; msg += "SM_Id: " + data.sobject.Id; - Logger.info(msg); + console.log(msg); }); }); diff --git a/examples/servo/servo.coffee b/examples/servo/servo.coffee index 85a908b..527a1b0 100644 --- a/examples/servo/servo.coffee +++ b/examples/servo/servo.coffee @@ -12,7 +12,7 @@ Cylon.robot angle += increment my.servo.angle angle - Logger.info "Current Angle: #{my.servo.currentAngle()}" + console.log "Current Angle: #{my.servo.currentAngle()}" increment = -increment if (angle is 30) or (angle is 150) diff --git a/examples/servo/servo.js b/examples/servo/servo.js index 89ea110..4be79a0 100644 --- a/examples/servo/servo.js +++ b/examples/servo/servo.js @@ -12,7 +12,7 @@ Cylon.robot({ angle += increment; my.servo.angle(angle); - Logger.info("Current Angle: " + (my.servo.currentAngle())); + console.log("Current Angle: " + (my.servo.currentAngle())); if ((angle === 30) || (angle === 150)) { increment = -increment; } }); diff --git a/examples/servo/servo.litcoffee b/examples/servo/servo.litcoffee index d9dabd1..017643a 100644 --- a/examples/servo/servo.litcoffee +++ b/examples/servo/servo.litcoffee @@ -38,7 +38,7 @@ supported: every 1.seconds(), -> angle += increment my.servo.angle(angle) - Logger.info "Current angle: #{my.servo.currentAngle() }" + console.log "Current angle: #{my.servo.currentAngle() }" increment = -increment if (angle is 30) or (angle is 150) And with all that done, we can now start our robot: diff --git a/examples/sf-sphero/sf-sphero.coffee b/examples/sf-sphero/sf-sphero.coffee index cf1e681..ab2f4a0 100644 --- a/examples/sf-sphero/sf-sphero.coffee +++ b/examples/sf-sphero/sf-sphero.coffee @@ -20,7 +20,7 @@ class SalesforceRobot msg += "Bucks: #{data.sobject.Bucks__c}," msg += "SM_Id: #{data.sobject.Id}" - Logger.info msg + console.log msg me.master.findRobot data.sobject.Sphero_Name__c, (err, spheroBot) -> spheroBot.react spheroBot.devices.sphero @@ -38,7 +38,7 @@ class SpheroRobot work: (me) -> me.sphero.on 'connect', -> - Logger.info 'Setting up Collision Detection...' + console.log 'Setting up Collision Detection...' me.sphero.detectCollisions() me.sphero.stop() me.sphero.setRGB 0x00FF00 diff --git a/examples/sf-sphero/sf-sphero.js b/examples/sf-sphero/sf-sphero.js index c24a63c..817f1a7 100644 --- a/examples/sf-sphero/sf-sphero.js +++ b/examples/sf-sphero/sf-sphero.js @@ -28,7 +28,7 @@ var SalesforceRobot = (function() { msg = "Sphero: " + data.sobject.Sphero_Name__c + ","; msg += "Bucks: " + data.sobject.Bucks__c + ","; msg += "SM_Id: " + data.sobject.Id; - Logger.info(msg); + console.log(msg); me.master.findRobot(data.sobject.Sphero_Name__c, function(err, spheroBot) { spheroBot.react(spheroBot.devices.sphero); }); @@ -57,7 +57,7 @@ var SpheroRobot = (function() { SpheroRobot.prototype.work = function(me) { me.sphero.on('connect', function() { - Logger.info('Setting up Collision Detection...'); + console.log('Setting up Collision Detection...'); me.sphero.detectCollisions(); me.sphero.stop(); me.sphero.setRGB(0x00FF00); diff --git a/examples/sphero-pebble-sf/sphero-pebble-sf.coffee b/examples/sphero-pebble-sf/sphero-pebble-sf.coffee index 83f7de5..682f106 100644 --- a/examples/sphero-pebble-sf/sphero-pebble-sf.coffee +++ b/examples/sphero-pebble-sf/sphero-pebble-sf.coffee @@ -10,7 +10,7 @@ class PebbleRobot robot.message_queue().push(msg) work: (me) -> - me.pebble.on 'connect', -> Logger.info "Connected!" + me.pebble.on 'connect', -> console.log "Connected!" class SalesforceRobot connection: @@ -37,7 +37,7 @@ class SalesforceRobot msg += "data Bucks: #{bucks}," msg += "SM_Id: #{data.sobject.Id}" - Logger.info msg + console.log msg me.master.findRobot name, (err, spheroBot) -> spheroBot.react spheroBot.devices.sphero @@ -78,7 +78,7 @@ class SpheroRobot work: (me) -> me.sphero.on 'connect', -> - Logger.info 'Setting up Collision Detection...' + console.log 'Setting up Collision Detection...' me.sphero.detectCollisions() me.sphero.stop() me.sphero.setRGB 0x00FF00 diff --git a/examples/sphero-pebble-sf/sphero-pebble-sf.js b/examples/sphero-pebble-sf/sphero-pebble-sf.js index 1af4713..2d814be 100644 --- a/examples/sphero-pebble-sf/sphero-pebble-sf.js +++ b/examples/sphero-pebble-sf/sphero-pebble-sf.js @@ -17,7 +17,7 @@ var PebbleRobot = (function() { }; PebbleRobot.prototype.work = function(me) { - me.pebble.on('connect', function() { Logger.info("Connected!"); }); + me.pebble.on('connect', function() { console.log("Connected!"); }); }; return PebbleRobot; @@ -55,7 +55,7 @@ var SalesforceRobot = (function() { msg += "data Bucks: " + bucks + ","; msg += "SM_Id: " + data.sobject.Id; - Logger.info(msg); + console.log(msg); me.master.findRobot(name, function(err, spheroBot) { spheroBot.react(spheroBot.devices.sphero); @@ -122,7 +122,7 @@ var SpheroRobot = (function() { SpheroRobot.prototype.work = function(me) { me.sphero.on('connect', function() { - Logger.info('Setting up Collision Detection...'); + console.log('Setting up Collision Detection...'); me.sphero.detectCollisions(); me.sphero.stop(); me.sphero.setRGB(0x00FF00); diff --git a/examples/sphero_collision/sphero_collision.coffee b/examples/sphero_collision/sphero_collision.coffee index 6c11030..022eaaa 100644 --- a/examples/sphero_collision/sphero_collision.coffee +++ b/examples/sphero_collision/sphero_collision.coffee @@ -9,15 +9,15 @@ Cylon.robot bitFilter = 0xFFFF00 me.sphero.on 'connect', -> - Logger.info "Setting up Collision Detection..." + console.log "Setting up Collision Detection..." me.sphero.detectCollisions() me.sphero.setRGB color me.sphero.stop() me.sphero.on 'collision', (data) -> - Logger.info "Collision:" + console.log "Collision:" color = color ^ bitFilter - Logger.info "Color: #{color.toString(16)} " + console.log "Color: #{color.toString(16)} " me.sphero.setRGB color me.sphero.roll 90, Math.floor(Math.random() * 360) diff --git a/examples/sphero_collision/sphero_collision.js b/examples/sphero_collision/sphero_collision.js index c13a461..10ba65c 100644 --- a/examples/sphero_collision/sphero_collision.js +++ b/examples/sphero_collision/sphero_collision.js @@ -9,16 +9,16 @@ Cylon.robot({ var bitFilter = 0xFFFF00; me.sphero.on('connect', function() { - Logger.info("Setting up Collision Detection..."); + console.log("Setting up Collision Detection..."); me.sphero.detectCollisions(); me.sphero.setRGB(color); me.sphero.stop(); }); me.sphero.on('collision', function(data) { - Logger.info("Collision:"); + console.log("Collision:"); color = color ^ bitFilter; - Logger.info("Color: " + (color.toString(16)) + " "); + console.log("Color: " + (color.toString(16)) + " "); me.sphero.setRGB(color); me.sphero.roll(90, Math.floor(Math.random() * 360)); }); diff --git a/examples/sphero_collision/sphero_collision.litcoffee b/examples/sphero_collision/sphero_collision.litcoffee index 72647b5..1cdf3be 100644 --- a/examples/sphero_collision/sphero_collision.litcoffee +++ b/examples/sphero_collision/sphero_collision.litcoffee @@ -34,7 +34,7 @@ When our Sphero emits the 'connect' event, we're going to hook up collision detection, make sure it's not moving, and set a color. me.sphero.on 'connect', -> - Logger.info "Setting up Collision Detection..." + console.log "Setting up Collision Detection..." me.sphero.detectCollisions() me.sphero.setRGB color me.sphero.stop() @@ -43,7 +43,7 @@ And when our Sphero detects a collision, we want to notify the user of this via the console. me.sphero.on 'collision', (data) -> - Logger.info "Collision:" + console.log "Collision:" We get the new color for a Sphero by doing a bitwise XOR operation on it, using the bitfilter above. @@ -54,7 +54,7 @@ With our new color in hand, we can let the user know what color we're using now, and change the Sphero to that color. We'll also tell the Sphero to roll in a random direction, at speed 90. - Logger.info "Color: #{color.toString(16)} " + console.log "Color: #{color.toString(16)} " me.sphero.setRGB color me.sphero.roll 90, Math.floor(Math.random() * 360) diff --git a/examples/sphero_messages/sphero_messages.coffee b/examples/sphero_messages/sphero_messages.coffee index 44a3741..c0bf2fc 100644 --- a/examples/sphero_messages/sphero_messages.coffee +++ b/examples/sphero_messages/sphero_messages.coffee @@ -6,28 +6,28 @@ Cylon.robot work: (me) -> me.sphero.on 'connect', -> - Logger.info "Setting up Collision Detection..." + console.log "Setting up Collision Detection..." me.sphero.detectCollisions() me.sphero.setRGB 0x00FF00 me.sphero.on 'update', (data) -> - Logger.info "Update event eventName: #{data} " - Logger.info "Update event args: " - Logger.info data + console.log "Update event eventName: #{data} " + console.log "Update event args: " + console.log data me.sphero.on 'message', (data) -> me.sphero.setRGB 0x0000FF - Logger.info "Message:" - Logger.info data + console.log "Message:" + console.log data me.sphero.on 'collision', (data) -> me.sphero.setRGB 0xFF0000 - Logger.info "Collision:" - Logger.info data + console.log "Collision:" + console.log data me.sphero.on 'notification', (data) -> me.sphero.setRGB 0xFF0000 - Logger.info "Notification:" - Logger.info data + console.log "Notification:" + console.log data .start() diff --git a/examples/sphero_messages/sphero_messages.js b/examples/sphero_messages/sphero_messages.js index 52be273..a063014 100644 --- a/examples/sphero_messages/sphero_messages.js +++ b/examples/sphero_messages/sphero_messages.js @@ -6,33 +6,33 @@ Cylon.robot({ work: function(me) { me.sphero.on('connect', function() { - Logger.info("Setting up Collision Detection..."); + console.log("Setting up Collision Detection..."); me.sphero.detectCollisions(); me.sphero.setRGB(0x00FF00); }); me.sphero.on('update', function(data) { - Logger.info("Update event eventName: " + data + " "); - Logger.info("Update event args: "); - Logger.info(data); + console.log("Update event eventName: " + data + " "); + console.log("Update event args: "); + console.log(data); }); me.sphero.on('message', function(data) { me.sphero.setRGB(0x0000FF); - Logger.info("Message:"); - Logger.info(data); + console.log("Message:"); + console.log(data); }); me.sphero.on('collision', function(data) { me.sphero.setRGB(0xFF0000); - Logger.info("Collision:"); - Logger.info(data); + console.log("Collision:"); + console.log(data); }); me.sphero.on('notification', function(data) { me.sphero.setRGB(0xFF0000); - Logger.info("Notification:"); - Logger.info(data); + console.log("Notification:"); + console.log(data); }); } }).start(); diff --git a/examples/sphero_messages/sphero_messages.litcoffee b/examples/sphero_messages/sphero_messages.litcoffee index 207a3f9..005ca00 100644 --- a/examples/sphero_messages/sphero_messages.litcoffee +++ b/examples/sphero_messages/sphero_messages.litcoffee @@ -26,7 +26,7 @@ When the Sphero's connected, we want to set up collision detection and change it's color. me.sphero.on 'connect', -> - Logger.info "Setting up Collision Detection..." + console.log "Setting up Collision Detection..." me.sphero.detectCollisions() me.sphero.setRGB 0x00FF00 @@ -34,33 +34,33 @@ When the Sphero emits an 'update' event, we want to log the data it's provided to us: me.sphero.on 'update', (data) -> - Logger.info "Update event eventName: #{data} " - Logger.info "Update event args: " - Logger.info data + console.log "Update event eventName: #{data} " + console.log "Update event args: " + console.log data Similarly, when we get a message from the Sphero, we want to log the data, but we'll also change it's color while we're at it. me.sphero.on 'message', (data) -> me.sphero.setRGB 0x0000FF - Logger.info "Message:" - Logger.info data + console.log "Message:" + console.log data In the event of a collision, we want to change the color of the Sphero again, as well as logging the data provided by the collision event. me.sphero.on 'collision', (data) -> me.sphero.setRGB 0xFF0000 - Logger.info "Collision:" - Logger.info data + console.log "Collision:" + console.log data And, last but not least, when we get a notification event we want to record it's data and change the color. me.sphero.on 'notification', (data) -> me.sphero.setRGB 0xFF0000 - Logger.info "Notification:" - Logger.info data + console.log "Notification:" + console.log data And with all that done, we can finally start the robot. diff --git a/examples/sphero_multiple/sphero_multiple.coffee b/examples/sphero_multiple/sphero_multiple.coffee index d740f76..f383846 100644 --- a/examples/sphero_multiple/sphero_multiple.coffee +++ b/examples/sphero_multiple/sphero_multiple.coffee @@ -6,7 +6,7 @@ class SpheroRobot work: (my) -> every 1.seconds(), -> - Logger.info my.name + console.log my.name my.sphero.setRandomColor() my.sphero.roll 60, Math.floor(Math.random() * 360) diff --git a/examples/sphero_multiple/sphero_multiple.js b/examples/sphero_multiple/sphero_multiple.js index 5a91eb0..3dcab3a 100644 --- a/examples/sphero_multiple/sphero_multiple.js +++ b/examples/sphero_multiple/sphero_multiple.js @@ -8,7 +8,7 @@ var SpheroRobot = (function() { SpheroRobot.prototype.work = function(my) { every((1).second(), function() { - Logger.info(my.name); + console.log(my.name); my.sphero.setRandomColor(); my.sphero.roll(60, Math.floor(Math.random() * 360)); }); diff --git a/examples/sphero_multiple/sphero_multiple.litcoffee b/examples/sphero_multiple/sphero_multiple.litcoffee index bf98ac4..1049e31 100644 --- a/examples/sphero_multiple/sphero_multiple.litcoffee +++ b/examples/sphero_multiple/sphero_multiple.litcoffee @@ -31,7 +31,7 @@ name, change to a random color, and roll in a random direction. work: (my) -> every 1.seconds(), -> - Logger.info my.name + console.log my.name my.sphero.setRandomColor() my.sphero.roll 60, Math.floor(Math.random() * 360) diff --git a/examples/travis/travis.coffee b/examples/travis/travis.coffee index b40b9f3..f634454 100644 --- a/examples/travis/travis.coffee +++ b/examples/travis/travis.coffee @@ -20,7 +20,7 @@ Cylon.robot name = "cylon" me.checkTravis = -> - Logger.info "Checking repo #{user}/#{name}" + console.log "Checking repo #{user}/#{name}" me.sphero.setRGB BLUE, true travis.repos { diff --git a/examples/travis/travis.js b/examples/travis/travis.js index a92b43b..979c202 100644 --- a/examples/travis/travis.js +++ b/examples/travis/travis.js @@ -16,7 +16,7 @@ Cylon.robot({ var name = "cylon" me.checkTravis = function() { - Logger.info("Checking repo "+user+"/"+name); + console.log("Checking repo "+user+"/"+name); me.sphero.setRGB(BLUE, true); travis.repos( diff --git a/examples/travis/travis.litcoffee b/examples/travis/travis.litcoffee index fa1ff25..3e56fb1 100644 --- a/examples/travis/travis.litcoffee +++ b/examples/travis/travis.litcoffee @@ -65,7 +65,7 @@ on the state of the last build. First, it will log that it's checking Travis to the logger: - Logger.info "Checking last build status for #{user}/#{name}" + console.log "Checking last build status for #{user}/#{name}" Let's set the default color of the Sphero to blue until we know what the build status is: