const byte switchPin = 12;
void setup() {
Serial.begin(115200);
pinMode(switchPin, INPUT_PULLUP);
}
void loop() {
if (!digitalRead(switchPin)) {
Serial.println("Serie di switch chiusa");
delay(1000);
}
// necessario solo per il simulatore
delay(10);
}