  Timer1.attachInterrupt(timerInterrupt);
  Serial.begin(9600);
  
- pinMode(BUTTON, INPUT);
- pinMode(SLOT, INPUT);
+ //pinMode(BUTTON, INPUT);
+ //pinMode(SLOT, INPUT);
 
  //set other output 
 }

//int BUTTON=;
//int SLOT=;


public char time200 = 0;
//public char time4 = 0;
public int sonicValue=0;
public int irValue=0;
public int encoderSpeed = 0;

public boolean buttonValue= false;
public boolean slotValue= false;

public int SerialState=0;


void timerInterrupt(){
  //read switch at a granulartiy of 0.02s
  //take serial communication every 0.1s
  static int timer_count = 0;

  timer_count++;
  if(timer_count ==200) {
    //0.1 secound reached

  Serial.print("\n"); 
  //send encoder Value
  Serial.write("W");
  Serial.write(encoderSpeed);
  Serial.print("\n");
  //send button state
  Serial.write("B");
