 const int contrastPin = 6;
 const int contrast = 40;
 
-const int gate = 7;
+const int gate = 9;
 int mode = 0;
+int outputValue;
 
 void setup() {
   Serial.begin(9600);

      digitalWrite(gate, LOW);
    }
    else {
      digitalWrite(gate, HIGH);
    }
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("New value ");

    lcd.write("Enter 0 or 1");
  }
}

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

