   pinMode(gatePin, OUTPUT);
   pinMode(tempPin, INPUT);
   pinMode(lightPin, INPUT);
+  pinMode(greenLED, OUTPUT);
   Serial.println("Enter 0 or 1");
 }
 

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

const int gatePin = 11;
const int tempPin = A0;
const int lightPin = A1;
const int greenLED = 8;
int mode, tempVal, outputValue;
CapacitiveSensor capSensor = CapacitiveSensor(4, 2);

