     if (paramcheck > 0) {
       useCommandWithParams(command);
     } else {
-      Serial.println("NACK");
+      DebugPrintln("NACK");
     }
   }
 }

  int endCommand = command.indexOf(":");
  String beginCommand = command.substring(0, endCommand);
  String parameter = command.substring(endCommand + 1);
  Serial.println("begincommand:" + beginCommand + ", parameter:" + parameter);

  if (beginCommand == "SPEED") {
    setRobotSpeed(parameter.toInt());
  }
  
  if (beginCommand == "DIRECTION") {
    if (parameter == "RIGHT")
    {
      state = State::Right;

#include <SoftwareSerial.h>
#include <Rp6.h>

#define DEBUG 1

enum class State { Forward, Backward, Left, Right, Startup };
State state = State::Startup;
SoftwareSerial Comport(D7, D8);

int robotSpeed = 0;
float invertedRotateSpeed = 0; // can be 0 to 1, the higher it is, the slower the robot rotates

// Create an instance of the server
// specify the port to listen on as an argument
WiFiServer server(80);
