     digitalWrite(S2, HIGH);
     S2State=false;
   }
-  //Serial.println(S2State);
-}
+}
+
 
 //Callback function is called only when a valid code is received.
 char checkCode(unsigned long receivedCode, unsigned int period){
   //Note: interrupts are disabled. You can re-enable them if needed.
 
   //print received code
-  //Serial.print("Code = ");
-  //Serial.println(receivedCode);
-
+  /*
+  Serial.print("Code = ");
+  Serial.println(receivedCode);
+  getboolstates();
+  */
+  
   if (receivedCode == 531272) {
     task2 = millis();
     //Serial.println("Switch Relais 1 ON");
-    if (floor_og == true && floor_eg == true) {
-      // do nothing
-    } else {
-      SWRelais("ON");
-      SecRelais1("ON");
-    }
+    SWRelais("ON");
+    SecRelais1("ON");
   
   } else if (receivedCode == 531380) {
     //Serial.println("Switch Relais 2 ON");

    digitalWrite(RO, HIGH);
    ROState=false;
  }
  //Serial.println(ROState);
}

void SecRelais1(char mode){
  /*
   * Relais 1 with state check (DOWN)
   */
  if (mode == "ON") {
    if (S1State == false && S2State == false) {
      S1State=true;
      //liftdown=true;
      //liftup=false;
      digitalWrite(S1, LOW);
    } else if (S1State == false && S2State == true) {
      digitalWrite(S2, HIGH);
      S2State=false;
      //liftup=false;
      delay(80);
      S1State=true;
      //liftdown=true;
      digitalWrite(S1, LOW);
    } else if (S1State == true && S2State == false) {
      // do nothing
    }
  } else {
    digitalWrite(S1, HIGH);
    S1State=false;
  }
  //Serial.println(S1State);
}

void SecRelais2(char mode){
  /*
   * Relais 2 with state check (UP)
   */
  if (mode == "ON") {
    if (S2State == false && S1State == false) {
      S2State=true;
      digitalWrite(S2, LOW);
    } else if (S2State == false && S1State == true) {
      digitalWrite(S1, HIGH);
      S1State=false;
      delay(80);

 * 
 */
#include <RemoteReceiver.h>

int RO = PB1; // LOW = Versorge Relais (VCC) mit Spannung HIGH = schalte Spannung ab (PNP Transistor)
int S1 = PB4; // Relais 1
int S2 = PB3; // Relais 2
/*
int RO = 4;
int S1 = 7;
int S2 = 8;
char v[4]="1.2";
*/
// da bei ATtiny85 bereits alle Pins gebraucht werden, muessen wir uns mit einem Boolean Feld zufrieden geben.
// die Boolean Felder sind fuer uns sozusagen der Ersatz von 2 zusaetzlichen Input Pins
