Error: new declaration

So I really don't know why the programm doesn't work, and all I find in the Internet is to hard to nderstand for me I think :confused:

The programm itselve is really simple:

int SchalterZustand1;
int InputPin1;
int Schalter();

void setup() {
Serial.begin(9600);
InputPin1 = 5;
pinMode(28,OUTPUT);
pinMode(InputPin1, INPUT);

}

void loop() {

InputPin1 = 5;
SchalterZustand1 = digitalRead(InputPin1);
Serial.println(SchalterZustand1, DEC);

if(SchalterZustand1 == HIGH){
void Schalter()
}

}
void Schalter() {
digitalWrite(28, HIGH);
}
}

:frowning:
exit status 1
new declaration 'void Schalter()'
:frowning:

I look forward to answers :slight_smile:

And I just deleted the "void" in the "if" funktion

void Schalter() {
    digitalWrite(28, HIGH);
}
}

Oops

    void Schalter()

What do you think this line does ?

If you want to call the Schalter() function then do it like this

    Schalter();

Also you have a function prototype declared as returning an int

int Schalter();

but the function is actually void

void Schalter()
{
  digitalWrite(28, HIGH);
}

Just to make sure that the program does not compile you have one too many closing braces at the end of it

Thank you!!
Now it works perfectly fine I think i am a little bit to sloppy with Ardino as a new programm to me^^