 static volatile int encoderState = 0;
 static volatile int encoderPosition = 0;
 
+static void emergencyStopISR();
+static void limitSwitchCloseISR();
+static void limitSwitchOpenISR();
+static void encoderGate1ISR();
+static void encoderGate2ISR();
+static void stop(const String&);
+static void open(const String&);
+static void close(const String&);
+static void setspeed(const String&);
+static void status(const String&);
+static void test(const String&);
+
+
 void setup() {
 
+    pinMode(PIN_UNUSED, INPUT);
     pinMode(PIN_BUTTON_CLOSE, INPUT);
     pinMode(PIN_BUTTON_OPEN, INPUT);
     pinMode(PIN_BUTTON_EMERGENCYSTOP, INPUT);

#include "Version.h"

#define BOARD_NAME "KOMAROOF"
#define PIN_ONE_WIRE_BUS 44
#define PIN_BUTTON_CLOSE 42
#define PIN_BUTTON_OPEN 40

    int previousEncoderState = encoderState;
    encoderState = (encoderState & 0x2) | (digitalRead(PIN_ENCODER_GATE_2) == LOW ? 0x1 : 0);
    updateEncoder(previousEncoderState, encoderState);
}

void currentMeasurementTick() {
