arduino jumper programmieren

Step 1: Include the necessary libraries

#include <Arduino.h>
#include <Wire.h>

Step 2: Define the jumper pin

const int jumperPin = 7;  // Replace 7 with the actual pin number you are using

Step 3: Setup function

void setup() {
  pinMode(jumperPin, INPUT);
  Serial.begin(9600);
}

Step 4: Loop function

void loop() {
  int jumperState = digitalRead(jumperPin);
  Serial.print("Jumper state: ");
  Serial.println(jumperState);
  delay(1000);  // Adjust delay as needed
}