+#include <SoftwareSerial.h>
+
 #define PIN_RED 3
 #define PIN_GREEN 4
 #define PIN_BLUE 5
+
+#define PIN_BT_RX 10
+#define PIN_BT_TX 11
+
+#define BAUDRATE_SERIAL 9600
+#define BAUDRATE_BT 9600
 
 #define PIN_STATUS LED_BUILTIN
 


unsigned long lightModeStart = 0;
LightMode lightMode = NONE;

void setup() {
  pinMode(PIN_RED, OUTPUT);

  digitalWrite(PIN_BLUE, LOW);
  digitalWrite(PIN_STATUS, LOW);
  
  Serial.begin(BAUDRATE_SERIAL);

  BT.begin(BAUDRATE_BT);
}

void loop() {
  if (Serial.available()) {
    String command = Serial.readStringUntil('\n');
    handleCommand(command, false);
  }

  if (BT.available()) {
    String command = BT.readStringUntil('\n');
    handleCommand(command, true);
  }

  processLightMode();
}

void handleCommand(String command, boolean fromBT) {
  String output = processCommand(command);
    if (output.length() > 0) {
      if (fromBT) BT.println("+" + command);
      else Serial.println("+" + command);
      if (output != EMPTY_COMMAND_SUCCESS) {
        if (fromBT) BT.println(output);
        else Serial.println(output);
      }
      blink(PIN_STATUS, 2);
    } else {
      if (fromBT) BT.println("-" + command);
      else Serial.println("-" + command);
      if (fromBT) BT.println("UNKNOWN");
      else Serial.println("UNKNOWN");
      blink(PIN_STATUS, 1);
    }
}

void processLightMode() {
