📅  最后修改于: 2022-03-11 14:44:52.197000             🧑  作者: Mango
const byte jumperPin1 = 12;
const byte jumperPin2 = 9;
void setup() {
pinMode(jumperPin1, INPUT_PULLUP);
pinMode(jumperPin2, INPUT_PULLUP);
Serial.begin(9600);
}
void loop() {
if (digitalRead(jumperPin1) == 0)
{
Serial.println("BLAU");
}
if (digitalRead(jumperPin2) == 0)
{
Serial.println("ROT");
}
}