#define S1 7
#define S2 4
#define S3 2
#define V1 8
bool S1_h, S2_h, S3_h;
void setup() {
// put your setup code here, to run once:
pinMode(S1,INPUT_PULLUP);
pinMode(S2,INPUT_PULLUP);
pinMode(S3,INPUT_PULLUP);
pinMode(V1,OUTPUT);
}
void loop() {
//Eingangsabbild
S1_h = !digitalRead(S1);
S2_h = !digitalRead(S2);
S3_h = !digitalRead(S3);
// put your main code here, to run repeatedly:
if ( S1_h && S2_h && S3_h )
{digitalWrite(V1, HIGH);
}
else
{
digitalWrite(V1, LOW);
}
}//end loop