Guys how do I solve this I want to compare Richting[1] ( wich is a "V") and then do something but it gives me this error "warning: ISO C++ forbids comparison between pointer and integer [-fpermissive]".
How do I need to write my code so I can compare this in the right way ?
Thanks again
Using arduino uno
#define E1 10Â // Enable Pin for motor 1
#define E2 11Â // Enable Pin for motor 2
#define I1 8Â // Control pin 1 for motor 1 for L293D it changes the direction of the motor
#define I2 9Â // Control pin 2 for motor 1 for L293D it changes the direction of the motor
#define I3 12Â // Control pin 1 for motor 2 for L293D it changes the direction of the motor
#define I4 13Â // Control pin 2 for motor 2 for L293D it changes the direction of the motor
char Richting[1] ;Â // Direction
int Axis;Â Â Â Â Â Â Â Â // Numbers (the speed I want to set on the motors)
const byte numChars = 32;
char receivedChars[numChars]; // an array to store the received data
boolean newData = false;
void setup() {
 Serial.begin(2400);
 pinMode(2, OUTPUT);
 pinMode(3, OUTPUT);
 pinMode(4, OUTPUT);
 pinMode(5, OUTPUT);
 pinMode(13, OUTPUT);
 pinMode(E1, OUTPUT);
 pinMode(E2, OUTPUT);
 pinMode(I1, OUTPUT);
 pinMode(I2, OUTPUT);
 pinMode(I3, OUTPUT);
 pinMode(I4, OUTPUT);
 Serial.println("<Arduino is ready>");
}
void loop() {
 if (recievedMessage())
 {
  parseMessage();
  Calculation();
  showNewMessage();
 }
}
bool recievedMessage() {
 static byte ndx = 0;
 char endMarker = '\n';
 char rc;
 while (Serial.available() > 0 && newData == false) {
  rc = Serial.read();
  if (rc != endMarker) {
   receivedChars[ndx] = rc;
   ndx++;
   if (ndx >= numChars) {
    ndx = numChars - 1;
   }
  }
  else {
   receivedChars[ndx] = '\0'; // terminate the string
   ndx = 0;
   newData = true;
   return true;
  }
 }
 return false;
}
void showNewMessage() {
 if (newData == true) {
  newData = false;
  Serial.println(Richting[1]);
 }
}
void parseMessage()
{
 strtok(receivedChars, ",");
 strcpy(Richting, receivedChars);
 Axis = atoi(strtok(NULL, ","));
}
void Calculation()
{
 if (Richting[1] == "A") {
  digitalWrite(3, HIGH);
  analogWrite(E1, Axis * 2);
  analogWrite(E2, Axis * 2);
  digitalWrite(I1, HIGH);
  digitalWrite(I2, LOW);
  digitalWrite(I3, HIGH);
  digitalWrite(I4, LOW);
 }
 else {
  digitalWrite(3, LOW);
  digitalWrite(I1, LOW);
  digitalWrite(I2, HIGH);
  digitalWrite(I3, LOW);
  digitalWrite(I4, HIGH);
 }
 if (Richting[1] == "V") {
  digitalWrite(2, HIGH);
  analogWrite(E1, Axis * 2);
  analogWrite(E2, Axis * 2);
  digitalWrite(I1, LOW);
  digitalWrite(I2, HIGH);
  digitalWrite(I3, LOW);
  digitalWrite(I4, HIGH);
 }
 else {
  digitalWrite(2, LOW);
  digitalWrite(I1, HIGH);
  digitalWrite(I2, LOW);
  digitalWrite(I3, HIGH);
  digitalWrite(I4, LOW);
 }
}