    }
 }
 //check if we have to togle the event
-//based on the node variables
 bool togleSensor(int sensor){
   byte first,second;
   bool resp=false;

//create the merg object
MergCBUS cbus=MergCBUS(NODE_VARS,NODE_EVENTS,EVENTS_VARS,DEVICE_NUMBERS);


void setup(){
  

  cbus.setDebug(true);//print some messages on the serial port
  cbus.setUserHandlerFunction(&myUserFunc);//function that implements the node logic
  cbus.initCanBus(53,CAN_125KBPS,10,200);  //initiate the transport layer. pin=53, rate=125Kbps,10 tries,200 millis between each try
  cbus.setTimerInterval(10000);  
  //create the servos object
  setupSensors();
  //using timer
  Timer1.initialize(10000);//microseconds
  Timer1.attachInterrupt(readCanMessages);
  Serial.println("Setup finished");
}

void loop (){

  cbus.run();//do all logic
  
  if (cbus.getNodeState()==NORMAL){
    checkSensors();
