Answers for "arduino jumper programmieren"

C++
0

arduino jumper programmieren

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");
  }

}
Posted by: Guest on June-06-2021

Browse Popular Code Answers by Language