I need help with the codeing

i have been codeing and i need help is is saying that expected '}' at end of input could you guys help the codeing is write here
int LED = 12 ;
int Swich1 = 2 ; //pin 2 will be atched to our swich
int Swich2 = 4 ;
int Swich3 = 7 ;
void setup() {
pinMode(LED, OUTPUT);
pinMode(LED, INPUT);
}

void loop() {
if (digitalRead(Swich1) == HIGH) {
digitalWrite(LED, HIGH);//turn light on
}
else {
digitalWrite(LED, LOW);
if (digitalRead(Swich2) == HIGH) {
digitalWrite(LED, HIGH);
delay(1000);
digitalWrite(LED, LOW);
delay(1000);
}
else {
digitalWrite(LED, LOW);
}

if (digitalRead(Swich3) == HIGH) {
  digitalWrite(LED, HIGH);
  delay(150);
  digitalWrite(LED, HIGH);
  delay(150);
}
else {
  digitalWrite(LED, LOW);
}

}

Did you try adding a } at the end?
I would.

It may not achieve exactly what you want, but it may at least allow you to compile, and start testing.

Consistent indentation helps to visualise code structure, and code tags help others read your code

Hi,
a close "}" is missing at the end of your code.

press CTRL T to AutoFomat the sketch to see how the brackets are arrangent.

thank you

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.