Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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

}
Source by forum.arduino.cc #
 
PREVIOUS NEXT
Tagged: #arduino #jumper #programmieren
ADD COMMENT
Topic
Name
9+8 =