motor controlled via bluetooth

Hi, I’m new on Arduino Uno but for my school test I want to make an automated gate controlled through the Android App “Arduino BT Control”.
I used a DC motor and two limit switches.

#include <SoftwareSerial.h>
#define bluetooth Serial
#define FCaperto 1
#define FCchiuso 2
SoftwareSerial mySerial(0, 1);
#include <Servo.h>
Servo myservo;
float tempC;
int tempPin = 0;
char lettera;

int valoreFCaperto = 0;

void setup() {
pinMode(FCaperto, INPUT);
myservo.attach(9);
Serial.begin(9600);
}

void loop() {
if(Serial.available()){
lettera = Serial.read();
}

valoreFCaperto = digitalRead(FCaperto);
if (valoreFCaperto == 1)
{myservo.write(90);
delay (1000);
myservo.write(180);}

valoreFCchiuso = digitalRead(FCchiuso);
if (valoreFCchiuso == 1)
{myservo.write(90); }

if(lettera==‘D’) { //se la lettera è ‘D’
myservo.write(0); //attivo il servo
}
else if(lettera==‘F’) { //se la lettera è ‘F’
myservo.write(90); //spengo il servo
}

if(lettera==‘G’) { //se la lettera è ‘G’
myservo.write(180); //attivo il servo
}
else if(lettera==‘H’) { //se la lettera è ‘H’
myservo.write(90); //spengo il servo
}
}

Until i had only the motor it worked so I think I made a mistake on the limit switch.
Thank you for the help

Serial operates on pins 0 and 1. So you can't have SoftwareSerial on the same pins. And then you also have FCaperto on pin 1. Use a few different pins.

Steve