 
 #define SERIAL_ON 0
 #define WIICHUCK_ON 1
+
+#define DEBUG 0
 
 //    tophat left x 24
 //    tophat left y 124

          stop();
        }
        
//        debugChuck();
    }

    loop_cnt++;

  analogWrite(SPEED_A, 0);
  digitalWrite(MOTOR_B, LOW);
  analogWrite(SPEED_B, 0);

  if (DEBUG) {
      Serial.println("stop");
  }
}

void forward(char a, char b) {
  analogWrite(SPEED_A,a);
  digitalWrite(MOTOR_A,LOW);
  analogWrite(SPEED_B,b);
  digitalWrite(MOTOR_B,LOW);
  if (DEBUG) {    
      Serial.println("forward");
  }
}

void reverse (char a, char b) {
  analogWrite(SPEED_A,a);
  digitalWrite(MOTOR_A,HIGH);
  analogWrite(SPEED_B,b);
  digitalWrite(MOTOR_B,HIGH);

  if (DEBUG) {
      Serial.println("reverse");
  }
}

void left (char a, char b) {
  analogWrite(SPEED_A, a);
  digitalWrite(MOTOR_A, LOW);
  analogWrite(SPEED_B, b);
  digitalWrite(MOTOR_B, HIGH);
  
  if (DEBUG) {
      Serial.println("left");
  }
}

void right (char a, char b) {
  analogWrite(SPEED_A, a);
  digitalWrite(MOTOR_A, HIGH);
  analogWrite(SPEED_B, b);
  digitalWrite(MOTOR_B, LOW);
  
  if (DEBUG) {
      Serial.println("right");
  }
}

