     pinMode(E1, OUTPUT);   
     pinMode(E2, OUTPUT);   
     pinMode(ST, INPUT);   
-    
-    AdaEncoder::addEncoder('a', 2, 3);
+    pinMode(ENC1, INPUT);   
+    pinMode(ENC2, INPUT);   
 }
 
 void loop()
 {
-  encoder *thisEncoder;
   Serial.println("Hallo Welt!.");
   delay(3000);
   Serial.println("Calibrating...");

  Calibrate();
  Serial.println("Done.");
  
  thisEncoder=AdaEncoder::genie(&clicks, &id);
  
  int oldPos = 0;
  while(true)
  {
    thisEncoder=AdaEncoder::genie(&clicks, &id);
    if (thisEncoder != NULL) {
      pos += clicks;
      if (clicks != 0)
      {
        Serial.println(pos);
      }
    }
  }    
    
    /*
    int i = digitalRead(Enc1);
    int j = digitalRead(Enc2);
    sprintf(buf, "%d %d", i, j);
    Serial.println(buf);
    */
   
   /* 
    int newPos = encoder.read();
    if (newPos != oldPos)
    {
      Serial.println(newPos);
      oldPos = newPos;
    }
    */
  }
}

void Calibrate()
{

#include <Encoder.h>

//Arduino PWM Speed Contro
#define E1 5  
#define M1 4 
#define E2 6                      
#define M2 7

// Calibration sensor 
#define ST 8

// Encoders
#define ENC1 2
#define ENC2 3

#define EPSILON 10

char buf [20];

signed int motorSpeed = 0;
long pos = 0;
long oldPos = 0;


Encoder myEncoder(ENC1, ENC2);

void setup()
{
