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

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


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

