-const int gate = 11;
-int mode = 0;
-int outputValue;
+const int gatePin = 11;
+const int tempPin = A0;
+const int lightPin = A1;
+int mode, tempVal, outputValue;
 
 void setup() {
   Serial.begin(9600);
-  pinMode(gate, OUTPUT);
+  pinMode(gatePin, OUTPUT);
+  pinMode(tempPin, INPUT);
+  pinMode(lightPin, INPUT);
   Serial.println("Enter 0 or 1");
 }
 

    }
    delay(500);
  }
  delay(50);
}

void startMotor() {
  outputValue = 0;
  while (outputValue < 256) {
    analogWrite(gate, outputValue);
    outputValue++;
    delay(10);
  }
}


    mode = Serial.parseInt();
    if (mode == 0) {
      Serial.println("Stopping motor");
      digitalWrite(gatePin, LOW);
    }
    else {
      Serial.println("Starting motor");
