Boa noite, estou tentado controlar servos por controle de ps2, porem sempre que compilo aparece a seguinte mensagem 

sketch_sep15b:16: error: stray '\302' in program

  ps2x.config_gamepad(13, 11, 10, 12, true, true);

^

sketch_sep15b:16: error: stray '\240' in program

sketch_sep15b:17: error: stray '\302' in program

  servo.attach(9);

^

sketch_sep15b:17: error: stray '\240' in program

sketch_sep15b:22: error: stray '\302' in program

  ps2x.read_gamepad(false, vibrate);

^

sketch_sep15b:22: error: stray '\240' in program

sketch_sep15b:23: error: stray '\302' in program

  if (ps2x.ButtonPressed(PSB_START)) {

^

sketch_sep15b:23: error: stray '\240' in program

sketch_sep15b:24: error: stray '\302' in program

    automatico();

^

sketch_sep15b:24: error: stray '\240' in program

sketch_sep15b:24: error: stray '\302' in program

sketch_sep15b:24: error: stray '\240' in program

sketch_sep15b:25: error: stray '\302' in program

  }

^

sketch_sep15b:25: error: stray '\240' in program

sketch_sep15b:26: error: stray '\302' in program

  else if(ps2x.ButtonPressed(PSB_SELECT)) {

^

sketch_sep15b:26: error: stray '\240' in program

sketch_sep15b:27: error: stray '\302' in program

    manual();

^

sketch_sep15b:27: error: stray '\240' in program

sketch_sep15b:27: error: stray '\302' in program

sketch_sep15b:27: error: stray '\240' in program

sketch_sep15b:28: error: stray '\302' in program

  }  //By: Mateus Berger

^

sketch_sep15b:28: error: stray '\240' in program

sketch_sep15b:28: error: stray '\302' in program

sketch_sep15b:28: error: stray '\240' in program

sketch_sep15b:34: error: stray '\302' in program

  if (ps2x.ButtonPressed(PSB_PAD_UP)) {

^

sketch_sep15b:34: error: stray '\240' in program

sketch_sep15b:35: error: stray '\302' in program

    cima();

^

sketch_sep15b:35: error: stray '\240' in program

sketch_sep15b:35: error: stray '\302' in program

sketch_sep15b:35: error: stray '\240' in program

sketch_sep15b:36: error: stray '\302' in program

  }

^

sketch_sep15b:36: error: stray '\240' in program

sketch_sep15b:37: error: stray '\302' in program

  else if (ps2x.ButtonPressed(PSB_PAD_LEFT)) {

^

sketch_sep15b:37: error: stray '\240' in program

sketch_sep15b:38: error: stray '\302' in program

    esquerda();

^

sketch_sep15b:38: error: stray '\240' in program

sketch_sep15b:38: error: stray '\302' in program

sketch_sep15b:38: error: stray '\240' in program

sketch_sep15b:39: error: stray '\302' in program

  }

^

sketch_sep15b:39: error: stray '\240' in program

sketch_sep15b:40: error: stray '\302' in program

  else if (ps2x.ButtonPressed(PSB_PAD_RIGHT)) {

^

sketch_sep15b:40: error: stray '\240' in program

sketch_sep15b:41: error: stray '\302' in program

    direita();

^

sketch_sep15b:41: error: stray '\240' in program

sketch_sep15b:41: error: stray '\302' in program

sketch_sep15b:41: error: stray '\240' in program

sketch_sep15b:42: error: stray '\302' in program

  }

^

sketch_sep15b:42: error: stray '\240' in program

sketch_sep15b:43: error: stray '\302' in program

  else if (ps2x.ButtonPressed(PSB_PAD_DOWN)) {

^

sketch_sep15b:43: error: stray '\240' in program

sketch_sep15b:44: error: stray '\302' in program

    baixo();

^

sketch_sep15b:44: error: stray '\240' in program

sketch_sep15b:44: error: stray '\302' in program

sketch_sep15b:44: error: stray '\240' in program

sketch_sep15b:45: error: stray '\302' in program

  }

^

sketch_sep15b:45: error: stray '\240' in program

sketch_sep15b:46: error: stray '\302' in program

  else {

^

sketch_sep15b:46: error: stray '\240' in program

sketch_sep15b:47: error: stray '\302' in program

    parado();

^

sketch_sep15b:47: error: stray '\240' in program

sketch_sep15b:47: error: stray '\302' in program

sketch_sep15b:47: error: stray '\240' in program

sketch_sep15b:48: error: stray '\302' in program

  }

^

sketch_sep15b:48: error: stray '\240' in program

sketch_sep15b:52: error: stray '\302' in program

  servo.write(90); // escrever angulos no servo com write

^

sketch_sep15b:52: error: stray '\240' in program

sketch_sep15b:53: error: stray '\302' in program

  delay(200);

^

sketch_sep15b:53: error: stray '\240' in program

sketch_sep15b:54: error: stray '\302' in program

  distancia = analogRead(0);

^

sketch_sep15b:54: error: stray '\240' in program

sketch_sep15b:55: error: stray '\302' in program

  //calculo para definir a distancia sera posto aqui

^

sketch_sep15b:55: error: stray '\240' in program

sketch_sep15b:56: error: stray '\302' in program

 

^

sketch_sep15b:56: error: stray '\240' in program

sketch_sep15b:57: error: stray '\302' in program

  if (distancia >= 14) {

^

sketch_sep15b:57: error: stray '\240' in program

sketch_sep15b:58: error: stray '\302' in program

    cima();

^

sketch_sep15b:58: error: stray '\240' in program

sketch_sep15b:58: error: stray '\302' in program

sketch_sep15b:58: error: stray '\240' in program

sketch_sep15b:59: error: stray '\302' in program

  } //By: Mateus Berger

^

sketch_sep15b:59: error: stray '\240' in program

sketch_sep15b:60: error: stray '\302' in program

  else {

^

sketch_sep15b:60: error: stray '\240' in program

sketch_sep15b:61: error: stray '\302' in program

    parado();

^

sketch_sep15b:61: error: stray '\240' in program

sketch_sep15b:61: error: stray '\302' in program

sketch_sep15b:61: error: stray '\240' in program

sketch_sep15b:62: error: stray '\302' in program

    servo.write(0);

^

sketch_sep15b:62: error: stray '\240' in program

sketch_sep15b:62: error: stray '\302' in program

sketch_sep15b:62: error: stray '\240' in program

sketch_sep15b:63: error: stray '\302' in program

    delay(200); //tempo para o servo se mover até o angulo

^

sketch_sep15b:63: error: stray '\240' in program

sketch_sep15b:63: error: stray '\302' in program

sketch_sep15b:63: error: stray '\240' in program

sketch_sep15b:64: error: stray '\302' in program

    distanciaC1 = analogRead(0);

^

sketch_sep15b:64: error: stray '\240' in program

sketch_sep15b:64: error: stray '\302' in program

sketch_sep15b:64: error: stray '\240' in program

sketch_sep15b:65: error: stray '\302' in program

    //calculo

^

sketch_sep15b:65: error: stray '\240' in program

sketch_sep15b:65: error: stray '\302' in program

sketch_sep15b:65: error: stray '\240' in program

sketch_sep15b:66: error: stray '\302' in program

    servo.write(180);

^

sketch_sep15b:66: error: stray '\240' in program

sketch_sep15b:66: error: stray '\302' in program

sketch_sep15b:66: error: stray '\240' in program

sketch_sep15b:67: error: stray '\302' in program

    delay(400);//tempo para o servo se mover até o angulo

^

sketch_sep15b:67: error: stray '\240' in program

sketch_sep15b:67: error: stray '\302' in program

sketch_sep15b:67: error: stray '\240' in program

sketch_sep15b:68: error: stray '\302' in program

    distanciaC2 = analogRead(0);

^

sketch_sep15b:68: error: stray '\240' in program

sketch_sep15b:68: error: stray '\302' in program

sketch_sep15b:68: error: stray '\240' in program

sketch_sep15b:69: error: stray '\302' in program

    //calculo

^

sketch_sep15b:69: error: stray '\240' in program

sketch_sep15b:69: error: stray '\302' in program

sketch_sep15b:69: error: stray '\240' in program

sketch_sep15b:70: error: stray '\302' in program

    servo.write(90);

^

sketch_sep15b:70: error: stray '\240' in program

sketch_sep15b:70: error: stray '\302' in program

sketch_sep15b:70: error: stray '\240' in program

sketch_sep15b:71: error: stray '\302' in program

    delay(200);// tempo para servo voltar a possição normal

^

sketch_sep15b:71: error: stray '\240' in program

sketch_sep15b:71: error: stray '\302' in program

sketch_sep15b:71: error: stray '\240' in program

sketch_sep15b:72: error: stray '\302' in program

    if (distanciaC1 > distanciaC2) {

^

sketch_sep15b:72: error: stray '\240' in program

sketch_sep15b:72: error: stray '\302' in program

sketch_sep15b:72: error: stray '\240' in program

sketch_sep15b:73: error: stray '\302' in program

      esquerda();

^

sketch_sep15b:73: error: stray '\240' in program

sketch_sep15b:73: error: stray '\302' in program

sketch_sep15b:73: error: stray '\240' in program

sketch_sep15b:73: error: stray '\302' in program

sketch_sep15b:73: error: stray '\240' in program

sketch_sep15b:74: error: stray '\302' in program

      delay(200); //tempo para girar 90º

^

sketch_sep15b:74: error: stray '\240' in program

sketch_sep15b:74: error: stray '\302' in program

sketch_sep15b:74: error: stray '\240' in program

sketch_sep15b:74: error: stray '\302' in program

sketch_sep15b:74: error: stray '\240' in program

sketch_sep15b:75: error: stray '\302' in program

      parado();

^

sketch_sep15b:75: error: stray '\240' in program

sketch_sep15b:75: error: stray '\302' in program

sketch_sep15b:75: error: stray '\240' in program

sketch_sep15b:75: error: stray '\302' in program

sketch_sep15b:75: error: stray '\240' in program

sketch_sep15b:76: error: stray '\302' in program

    }

^

sketch_sep15b:76: error: stray '\240' in program

sketch_sep15b:76: error: stray '\302' in program

sketch_sep15b:76: error: stray '\240' in program

sketch_sep15b:77: error: stray '\302' in program

    else if (distanciaC2 > distanciaC1) {

^

sketch_sep15b:77: error: stray '\240' in program

sketch_sep15b:77: error: stray '\302' in program

sketch_sep15b:77: error: stray '\240' in program

sketch_sep15b:78: error: stray '\302' in program

      direita();

^

sketch_sep15b:78: error: stray '\240' in program

sketch_sep15b:78: error: stray '\302' in program

sketch_sep15b:78: error: stray '\240' in program

sketch_sep15b:78: error: stray '\302' in program

sketch_sep15b:78: error: stray '\240' in program

sketch_sep15b:79: error: stray '\302' in program

      delay(200); //tempo para girar 90º

^

sketch_sep15b:79: error: stray '\240' in program

sketch_sep15b:79: error: stray '\302' in program

sketch_sep15b:79: error: stray '\240' in program

sketch_sep15b:79: error: stray '\302' in program

sketch_sep15b:79: error: stray '\240' in program

sketch_sep15b:80: error: stray '\302' in program

      parado();

^

sketch_sep15b:80: error: stray '\240' in program

sketch_sep15b:80: error: stray '\302' in program

sketch_sep15b:80: error: stray '\240' in program

sketch_sep15b:80: error: stray '\302' in program

sketch_sep15b:80: error: stray '\240' in program

sketch_sep15b:81: error: stray '\302' in program

    }

^

sketch_sep15b:81: error: stray '\240' in program

sketch_sep15b:81: error: stray '\302' in program

sketch_sep15b:81: error: stray '\240' in program

sketch_sep15b:82: error: stray '\302' in program

    else {

^

sketch_sep15b:82: error: stray '\240' in program

sketch_sep15b:82: error: stray '\302' in program

sketch_sep15b:82: error: stray '\240' in program

sketch_sep15b:83: error: stray '\302' in program

      esquerda();

^

sketch_sep15b:83: error: stray '\240' in program

sketch_sep15b:83: error: stray '\302' in program

sketch_sep15b:83: error: stray '\240' in program

sketch_sep15b:83: error: stray '\302' in program

sketch_sep15b:83: error: stray '\240' in program

sketch_sep15b:84: error: stray '\302' in program

      delay(200);

^

sketch_sep15b:84: error: stray '\240' in program

sketch_sep15b:84: error: stray '\302' in program

sketch_sep15b:84: error: stray '\240' in program

sketch_sep15b:84: error: stray '\302' in program

sketch_sep15b:84: error: stray '\240' in program

sketch_sep15b:85: error: stray '\302' in program

      parado();

^

sketch_sep15b:85: error: stray '\240' in program

sketch_sep15b:85: error: stray '\302' in program

sketch_sep15b:85: error: stray '\240' in program

sketch_sep15b:85: error: stray '\302' in program

sketch_sep15b:85: error: stray '\240' in program

sketch_sep15b:86: error: stray '\302' in program

    } //By: Mateus Berger

^

sketch_sep15b:86: error: stray '\240' in program

sketch_sep15b:86: error: stray '\302' in program

sketch_sep15b:86: error: stray '\240' in program

sketch_sep15b:87: error: stray '\302' in program

  }

^

sketch_sep15b:87: error: stray '\240' in program

sketch_sep15b:93: error: stray '\302' in program

  //motores da ponte H

^

sketch_sep15b:93: error: stray '\240' in program

sketch_sep15b:97: error: stray '\302' in program

  //motores da ponte H

^

sketch_sep15b:97: error: stray '\240' in program

sketch_sep15b:101: error: stray '\302' in program

 //motores da ponte H   

^

sketch_sep15b:101: error: stray '\240' in program

exit status 1
stray '\302' in program

O PROGRAMA E O SEGUINTE 

sketch_sep15b:16: error: stray '\302' in program

  ps2x.config_gamepad(13, 11, 10, 12, true, true);

^

sketch_sep15b:16: error: stray '\240' in program

sketch_sep15b:17: error: stray '\302' in program

  servo.attach(9);

^

sketch_sep15b:17: error: stray '\240' in program

sketch_sep15b:22: error: stray '\302' in program

  ps2x.read_gamepad(false, vibrate);

^

sketch_sep15b:22: error: stray '\240' in program

sketch_sep15b:23: error: stray '\302' in program

  if (ps2x.ButtonPressed(PSB_START)) {

^

sketch_sep15b:23: error: stray '\240' in program

sketch_sep15b:24: error: stray '\302' in program

    automatico();

^

sketch_sep15b:24: error: stray '\240' in program

sketch_sep15b:24: error: stray '\302' in program

sketch_sep15b:24: error: stray '\240' in program

sketch_sep15b:25: error: stray '\302' in program

  }

^

sketch_sep15b:25: error: stray '\240' in program

sketch_sep15b:26: error: stray '\302' in program

  else if(ps2x.ButtonPressed(PSB_SELECT)) {

^

sketch_sep15b:26: error: stray '\240' in program

sketch_sep15b:27: error: stray '\302' in program

    manual();

^

sketch_sep15b:27: error: stray '\240' in program

sketch_sep15b:27: error: stray '\302' in program

sketch_sep15b:27: error: stray '\240' in program

sketch_sep15b:28: error: stray '\302' in program

  }  //By: Mateus Berger

^

sketch_sep15b:28: error: stray '\240' in program

sketch_sep15b:28: error: stray '\302' in program

sketch_sep15b:28: error: stray '\240' in program

sketch_sep15b:34: error: stray '\302' in program

  if (ps2x.ButtonPressed(PSB_PAD_UP)) {

^

sketch_sep15b:34: error: stray '\240' in program

sketch_sep15b:35: error: stray '\302' in program

    cima();

^

sketch_sep15b:35: error: stray '\240' in program

sketch_sep15b:35: error: stray '\302' in program

sketch_sep15b:35: error: stray '\240' in program

sketch_sep15b:36: error: stray '\302' in program

  }

^

sketch_sep15b:36: error: stray '\240' in program

sketch_sep15b:37: error: stray '\302' in program

  else if (ps2x.ButtonPressed(PSB_PAD_LEFT)) {

^

sketch_sep15b:37: error: stray '\240' in program

sketch_sep15b:38: error: stray '\302' in program

    esquerda();

^

sketch_sep15b:38: error: stray '\240' in program

sketch_sep15b:38: error: stray '\302' in program

sketch_sep15b:38: error: stray '\240' in program

sketch_sep15b:39: error: stray '\302' in program

  }

^

sketch_sep15b:39: error: stray '\240' in program

sketch_sep15b:40: error: stray '\302' in program

  else if (ps2x.ButtonPressed(PSB_PAD_RIGHT)) {

^

sketch_sep15b:40: error: stray '\240' in program

sketch_sep15b:41: error: stray '\302' in program

    direita();

^

sketch_sep15b:41: error: stray '\240' in program

sketch_sep15b:41: error: stray '\302' in program

sketch_sep15b:41: error: stray '\240' in program

sketch_sep15b:42: error: stray '\302' in program

  }

^

sketch_sep15b:42: error: stray '\240' in program

sketch_sep15b:43: error: stray '\302' in program

  else if (ps2x.ButtonPressed(PSB_PAD_DOWN)) {

^

sketch_sep15b:43: error: stray '\240' in program

sketch_sep15b:44: error: stray '\302' in program

    baixo();

^

sketch_sep15b:44: error: stray '\240' in program

sketch_sep15b:44: error: stray '\302' in program

sketch_sep15b:44: error: stray '\240' in program

sketch_sep15b:45: error: stray '\302' in program

  }

^

sketch_sep15b:45: error: stray '\240' in program

sketch_sep15b:46: error: stray '\302' in program

  else {

^

sketch_sep15b:46: error: stray '\240' in program

sketch_sep15b:47: error: stray '\302' in program

    parado();

^

sketch_sep15b:47: error: stray '\240' in program

sketch_sep15b:47: error: stray '\302' in program

sketch_sep15b:47: error: stray '\240' in program

sketch_sep15b:48: error: stray '\302' in program

  }

^

sketch_sep15b:48: error: stray '\240' in program

sketch_sep15b:52: error: stray '\302' in program

  servo.write(90); // escrever angulos no servo com write

^

sketch_sep15b:52: error: stray '\240' in program

sketch_sep15b:53: error: stray '\302' in program

  delay(200);

^

sketch_sep15b:53: error: stray '\240' in program

sketch_sep15b:54: error: stray '\302' in program

  distancia = analogRead(0);

^

sketch_sep15b:54: error: stray '\240' in program

sketch_sep15b:55: error: stray '\302' in program

  //calculo para definir a distancia sera posto aqui

^

sketch_sep15b:55: error: stray '\240' in program

sketch_sep15b:56: error: stray '\302' in program

 

^

sketch_sep15b:56: error: stray '\240' in program

sketch_sep15b:57: error: stray '\302' in program

  if (distancia >= 14) {

^

sketch_sep15b:57: error: stray '\240' in program

sketch_sep15b:58: error: stray '\302' in program

    cima();

^

sketch_sep15b:58: error: stray '\240' in program

sketch_sep15b:58: error: stray '\302' in program

sketch_sep15b:58: error: stray '\240' in program

sketch_sep15b:59: error: stray '\302' in program

  } //By: Mateus Berger

^

sketch_sep15b:59: error: stray '\240' in program

sketch_sep15b:60: error: stray '\302' in program

  else {

^

sketch_sep15b:60: error: stray '\240' in program

sketch_sep15b:61: error: stray '\302' in program

    parado();

^

sketch_sep15b:61: error: stray '\240' in program

sketch_sep15b:61: error: stray '\302' in program

sketch_sep15b:61: error: stray '\240' in program

sketch_sep15b:62: error: stray '\302' in program

    servo.write(0);

^

sketch_sep15b:62: error: stray '\240' in program

sketch_sep15b:62: error: stray '\302' in program

sketch_sep15b:62: error: stray '\240' in program

sketch_sep15b:63: error: stray '\302' in program

    delay(200); //tempo para o servo se mover até o angulo

^

sketch_sep15b:63: error: stray '\240' in program

sketch_sep15b:63: error: stray '\302' in program

sketch_sep15b:63: error: stray '\240' in program

sketch_sep15b:64: error: stray '\302' in program

    distanciaC1 = analogRead(0);

^

sketch_sep15b:64: error: stray '\240' in program

sketch_sep15b:64: error: stray '\302' in program

sketch_sep15b:64: error: stray '\240' in program

sketch_sep15b:65: error: stray '\302' in program

    //calculo

^

sketch_sep15b:65: error: stray '\240' in program

sketch_sep15b:65: error: stray '\302' in program

sketch_sep15b:65: error: stray '\240' in program

sketch_sep15b:66: error: stray '\302' in program

    servo.write(180);

^

sketch_sep15b:66: error: stray '\240' in program

sketch_sep15b:66: error: stray '\302' in program

sketch_sep15b:66: error: stray '\240' in program

sketch_sep15b:67: error: stray '\302' in program

    delay(400);//tempo para o servo se mover até o angulo

^

sketch_sep15b:67: error: stray '\240' in program

sketch_sep15b:67: error: stray '\302' in program

sketch_sep15b:67: error: stray '\240' in program

sketch_sep15b:68: error: stray '\302' in program

    distanciaC2 = analogRead(0);

^

sketch_sep15b:68: error: stray '\240' in program

sketch_sep15b:68: error: stray '\302' in program

sketch_sep15b:68: error: stray '\240' in program

sketch_sep15b:69: error: stray '\302' in program

    //calculo

^

sketch_sep15b:69: error: stray '\240' in program

sketch_sep15b:69: error: stray '\302' in program

sketch_sep15b:69: error: stray '\240' in program

sketch_sep15b:70: error: stray '\302' in program

    servo.write(90);

^

sketch_sep15b:70: error: stray '\240' in program

sketch_sep15b:70: error: stray '\302' in program

sketch_sep15b:70: error: stray '\240' in program

sketch_sep15b:71: error: stray '\302' in program

    delay(200);// tempo para servo voltar a possição normal

^

sketch_sep15b:71: error: stray '\240' in program

sketch_sep15b:71: error: stray '\302' in program

sketch_sep15b:71: error: stray '\240' in program

sketch_sep15b:72: error: stray '\302' in program

    if (distanciaC1 > distanciaC2) {

^

sketch_sep15b:72: error: stray '\240' in program

sketch_sep15b:72: error: stray '\302' in program

sketch_sep15b:72: error: stray '\240' in program

sketch_sep15b:73: error: stray '\302' in program

      esquerda();

^

sketch_sep15b:73: error: stray '\240' in program

sketch_sep15b:73: error: stray '\302' in program

sketch_sep15b:73: error: stray '\240' in program

sketch_sep15b:73: error: stray '\302' in program

sketch_sep15b:73: error: stray '\240' in program

sketch_sep15b:74: error: stray '\302' in program

      delay(200); //tempo para girar 90º

^

sketch_sep15b:74: error: stray '\240' in program

sketch_sep15b:74: error: stray '\302' in program

sketch_sep15b:74: error: stray '\240' in program

sketch_sep15b:74: error: stray '\302' in program

sketch_sep15b:74: error: stray '\240' in program

sketch_sep15b:75: error: stray '\302' in program

      parado();

^

sketch_sep15b:75: error: stray '\240' in program

sketch_sep15b:75: error: stray '\302' in program

sketch_sep15b:75: error: stray '\240' in program

sketch_sep15b:75: error: stray '\302' in program

sketch_sep15b:75: error: stray '\240' in program

sketch_sep15b:76: error: stray '\302' in program

    }

^

sketch_sep15b:76: error: stray '\240' in program

sketch_sep15b:76: error: stray '\302' in program

sketch_sep15b:76: error: stray '\240' in program

sketch_sep15b:77: error: stray '\302' in program

    else if (distanciaC2 > distanciaC1) {

^

sketch_sep15b:77: error: stray '\240' in program

sketch_sep15b:77: error: stray '\302' in program

sketch_sep15b:77: error: stray '\240' in program

sketch_sep15b:78: error: stray '\302' in program

      direita();

^

sketch_sep15b:78: error: stray '\240' in program

sketch_sep15b:78: error: stray '\302' in program

sketch_sep15b:78: error: stray '\240' in program

sketch_sep15b:78: error: stray '\302' in program

sketch_sep15b:78: error: stray '\240' in program

sketch_sep15b:79: error: stray '\302' in program

      delay(200); //tempo para girar 90º

^

sketch_sep15b:79: error: stray '\240' in program

sketch_sep15b:79: error: stray '\302' in program

sketch_sep15b:79: error: stray '\240' in program

sketch_sep15b:79: error: stray '\302' in program

sketch_sep15b:79: error: stray '\240' in program

sketch_sep15b:80: error: stray '\302' in program

      parado();

^

sketch_sep15b:80: error: stray '\240' in program

sketch_sep15b:80: error: stray '\302' in program

sketch_sep15b:80: error: stray '\240' in program

sketch_sep15b:80: error: stray '\302' in program

sketch_sep15b:80: error: stray '\240' in program

sketch_sep15b:81: error: stray '\302' in program

    }

^

sketch_sep15b:81: error: stray '\240' in program

sketch_sep15b:81: error: stray '\302' in program

sketch_sep15b:81: error: stray '\240' in program

sketch_sep15b:82: error: stray '\302' in program

    else {

^

sketch_sep15b:82: error: stray '\240' in program

sketch_sep15b:82: error: stray '\302' in program

sketch_sep15b:82: error: stray '\240' in program

sketch_sep15b:83: error: stray '\302' in program

      esquerda();

^

sketch_sep15b:83: error: stray '\240' in program

sketch_sep15b:83: error: stray '\302' in program

sketch_sep15b:83: error: stray '\240' in program

sketch_sep15b:83: error: stray '\302' in program

sketch_sep15b:83: error: stray '\240' in program

sketch_sep15b:84: error: stray '\302' in program

      delay(200);

^

sketch_sep15b:84: error: stray '\240' in program

sketch_sep15b:84: error: stray '\302' in program

sketch_sep15b:84: error: stray '\240' in program

sketch_sep15b:84: error: stray '\302' in program

sketch_sep15b:84: error: stray '\240' in program

sketch_sep15b:85: error: stray '\302' in program

      parado();

^

sketch_sep15b:85: error: stray '\240' in program

sketch_sep15b:85: error: stray '\302' in program

sketch_sep15b:85: error: stray '\240' in program

sketch_sep15b:85: error: stray '\302' in program

sketch_sep15b:85: error: stray '\240' in program

sketch_sep15b:86: error: stray '\302' in program

    } //By: Mateus Berger

^

sketch_sep15b:86: error: stray '\240' in program

sketch_sep15b:86: error: stray '\302' in program

sketch_sep15b:86: error: stray '\240' in program

sketch_sep15b:87: error: stray '\302' in program

  }

^

sketch_sep15b:87: error: stray '\240' in program

sketch_sep15b:93: error: stray '\302' in program

  //motores da ponte H

^

sketch_sep15b:93: error: stray '\240' in program

sketch_sep15b:97: error: stray '\302' in program

  //motores da ponte H

^

sketch_sep15b:97: error: stray '\240' in program

sketch_sep15b:101: error: stray '\302' in program

 //motores da ponte H   

^

sketch_sep15b:101: error: stray '\240' in program

exit status 1
stray '\302' in program

QUEM PUDER AJUDAR VAI SALVAR

Exibições: 2020

Responder esta

Respostas a este tópico

#include <PS2X_lib.h>
#include <Servo.h>

PS2X ps2x;
Servo servo;


byte vibrate = 0;

int modo = 1;
int distancia = 0;
int distanciaC1 = 0;
int distanciaC2 = 0;

void setup() {
  ps2x.config_gamepad(13, 11, 10, 12, true, true);
  servo.attach(9);
}


void loop() {
  ps2x.read_gamepad(false, vibrate);
  if (ps2x.ButtonPressed(PSB_START)) {
    automatico();
  }
  else if(ps2x.ButtonPressed(PSB_SELECT)) {
    manual();
  }  //By: Mateus Berger
}


/* void do modo de controle */
void manual() {
  if (ps2x.ButtonPressed(PSB_PAD_UP)) {
    cima();
  }
  else if (ps2x.ButtonPressed(PSB_PAD_LEFT)) {
    esquerda();
  }
  else if (ps2x.ButtonPressed(PSB_PAD_RIGHT)) {
    direita();
  }
  else if (ps2x.ButtonPressed(PSB_PAD_DOWN)) {
    baixo();
  }
  else {
    parado();
  }
}

void automatico() {
  servo.write(90); // escrever angulos no servo com write
  delay(200);
  distancia = analogRead(0);
  //calculo para definir a distancia sera posto aqui
 
  if (distancia >= 14) {
    cima();
  } //By: Mateus Berger
  else {
    parado();
    servo.write(0);
    delay(200); //tempo para o servo se mover até o angulo
    distanciaC1 = analogRead(0);
    //calculo
    servo.write(180);
    delay(400);//tempo para o servo se mover até o angulo
    distanciaC2 = analogRead(0);
    //calculo
    servo.write(90);
    delay(200);// tempo para servo voltar a possição normal
    if (distanciaC1 > distanciaC2) {
      esquerda();
      delay(200); //tempo para girar 90º
      parado();
    }
    else if (distanciaC2 > distanciaC1) {
      direita();
      delay(200); //tempo para girar 90º
      parado();
    }
    else {
      esquerda();
      delay(200);
      parado();
    } //By: Mateus Berger
  }
}

/* void que vai definir para que lado motor ira girar */

void cima() {
  //motores da ponte H
}

void baixo() {
  //motores da ponte H
}

void direita() {
 //motores da ponte H   
}

void esquerda() {
//motores da ponte H   
}

void parado() {
//motores da ponte H
}

Bom dia SL CK,

este tópico é de 2016.

RV

Bom dia RV, vi agora que você mencionou, coisa de velho aposentado kkkkkkkkkkkkk

Um grande abraço!!!

CK

Bem vindo de volta, Carlos! 

Obrigado Gustavo!

Um grande abraço!!!

CK

RSS

Destaques

Registre-se no
Lab de Garagem
Clicando aqui

Convide um
amigo para fazer
parte

curso gratis de arduino

© 2019   Criado por Marcelo Rodrigues.   Ativado por

Badges  |  Relatar um incidente  |  Termos de serviço