   //if using mega. the pin is 53
   cbus.initCanBus(10);  //initiate the transport layer. pin=53, rate=125Kbps,10 tries,200 millis between each try
 
-  //create the sensors
-  setupSensors();
-  //create the servos object
-  setupServos();  
   #ifdef DEBUGNODE
   Serial.println("Setup finished");
   Serial.print("NNN: ");

    byte lastPos;
    if (event){
      if (isServoToTogle(servoidx)){
        //Serial.println("on-moving servo t");
        servos[servoidx].write(servo_start,SPEED);
        lastPos = servo_start;
      }
      else {
        //Serial.println("on-moving servo");
        servos[servoidx].write(servo_end,SPEED);
        lastPos = servo_end;
      }
    }
    else{
      if (isServoToTogle(servoidx)){
        //Serial.println("off-moving servo t");
        servos[servoidx].write(servo_end,SPEED);
        lastPos = servo_end;
      }
      else {
        //Serial.println("off-moving servo");
        servos[servoidx].write(servo_start,SPEED);
        lastPos = servo_start;
      }
    }
   //write last pos to eprom
   //variables start with number 1  
   #ifdef  DEBUGNODE


void setup(){
  
  //create the sensors
  setupSensors();
  //create the servos object
  setupServos();  
  
  #ifdef DEBUGNODE
  Serial.begin(115200);
  delay(100);
