yes I need to toogle either piPin1 and piPin2 or toggle both of them
i change the code into
const int piPin1 = 4;
const int piPin2 = 5;
int PiState = 0;
void setup() {
pinMode(piPin1, INPUT);
pinMode(piPin2, INPUT);
}
void loop() {
PiState = digitalRead(PiState);
if (PiState == HIGH) {
digitalRead(piPin1);
digitalRead(piPin2);
}
if (PiState == LOW){
digitalRead(piPin1);
digitalRead(piPin2);
}
return 0;
}
Im totally new into microcontroller , some advice or help would be appriciated