   } else if (digitalRead(buttonPin) == LOW && laserEnabled == false) {
     inAfterStartState = false;
   }
+  checkSerial();
+}
+
+void checkSerial() {
+  static char buffer[80];
+  int len = readline(Serial.read(), buffer, 80);
+  if (len > 0) {
+    String message = buffer;
+    if (message.charAt(0) == enableKey && laserEnabled == false) {
+      enableLaser();
+      submitPower((byte)message.charAt(1));
+    } else if (message.charAt(0) == disableKey && laserEnabled == true) {
+      disableLaser();
+    } else if (message.charAt(0) == powerKey && laserEnabled == true) {
+      submitPower((byte)message.charAt(1));
+    }
+  }
 }
 
 void disableLaser() {
-  Serial.println("Disabling");
   digitalWrite(emPin, LOW);
   delay(periodMillis);
   digitalWrite(eePin, LOW);

  digitalWrite(prrPin, LOW);
  laserEnabled = false;
  digitalWrite(ledPin, LOW);
}

void enableLaser() {
  Serial.println("Enabling");
  digitalWrite(prrPin, HIGH);
  submitPower(powerLevel);
  delay(periodMillis);

    analogWrite(adjPowerPin, map(lvl, 0, 100, 0, 200));
  }
}

int readline(int readch, char *buffer, int len)
{
  static int pos = 0;
  int rpos;

  if (readch > 0) {
    switch (readch) {
      case '\n': // Ignore new-lines
        break;
      case '\r': // Return on CR
        rpos = pos;
        pos = 0;  // Reset position index ready for next time
        return rpos;
      default:
        if (pos < len - 1) {
          buffer[pos++] = readch;
          buffer[pos] = 0;
        }
    }
  }
  // No end of line has been found, so return -1.
  return -1;
}
