/*
 * KU Corobot Example: Serial Bridge
 * 
 * Bridge USB-based serial and bluetooth so that one can use 
 * a corobot as a debugging station.  Anything transmitted 
 * from the other corobot will show up on Serial Monitor and
 * vice versa.
 */
#include <Wire.h>
#include <Adafruit_TCS34725.h>
#include <Corobot.h>

void setup() {
  Serial.begin(9600);
  while (!Serial) delay(100);
  Corobot.init();
  Corobot.waitRemote();
  Corobot.setLeftLed(true);
  Serial.println("Serial bridge ready");
}

void loop() {
  if (Corobot.remote.available()) {
    Serial.write(Corobot.remote.read());
  }
  if (Serial.available()) {
    Corobot.remote.write(Serial.read());
  }
}
