 const byte emPin = 33;
 const byte prrPin = 31;
 const byte buttonPin = A0;
+const byte ledPin = 13;
 
 const byte powerLevel = 50;
 

  } else if (digitalRead(buttonPin) == LOW && laserEnabled == false) {
    inAfterStartState = false;
  }
}

void disableLaser() {
  Serial.println("Disabling");
  digitalWrite(emPin, LOW);
  delay(periodMillis);
  digitalWrite(eePin, LOW);

    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;
}
