int hlf = 1;
int llf = 2;
int mtr = 3;
int start = 0;
int stop = 0;
int pmp = 0;
void setup() {
// put your setup code here, to run once:
pinMode(hlf, INPUT);
pinMode(llf, INPUT);
pinMode(mtr, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
start = digitalRead(hlf);
stop = digitalRead(llf);
pmp = digitalRead(mtr);
if(start == HIGH && stop == HIGH || stop == HIGH && pmp == HIGH)
{digitalWrite(mtr, HIGH);}
if(start == LOW && stop == LOW)
{digitalWrite(mtr, LOW);
}
}