 
     return radio
 ])
+
+# a service to remember things we got from the robot
+.service('robotConsole', [
+  ->
+    robotConsole = {}
+    robotConsole.output = []
+
+    # write to the robot console (doesn't write to robot)
+    robotConsole._write = (str) ->
+      this.output.push str
+      console.log "[Robot Print]", str
+
+    robotConsole.lastLines = (n = 10) ->
+      _.last(this.output, n)
+
+    return robotConsole
+])

.service('radio', [
  '$interval'
  ($interval) ->
    radio = {}
    # whether or not we've initialized
    _init = false

        console.log('failed to open: ' + error)

      _ndl3Radio.connectXBee(_radioAddr, _serialPort)
      _ndl3Radio.on('string', (str) -> robotConsole._write(str))

    radio.close = ->
      if _init
