attiny85 - i2c not working with timers

I am using TinyWireS.h to use the attiny85 as a slave that reads analog inputs at a specified frequency.

I am using onRequest to send the data to the master, and onReceive to receive instructions that initiate the ADC reads into an array, using timer1 to adjust the reading frequency.

“onReceive” works just fine, it does everything it is expected, but then I send the data to an upper level, and the attiny doesn’t receive more information, it just accepts “onRequest” orders. It will accept “onRequest” orders, but “onReceive” stops working…

I am using timer1 so I don’t mess with the builtIn ISR from the I2C library. I don’t know why but this might be related with the “TinyWireS_stop_check();”

I am using two leds just for debug purposes.

Does anyone has any clue about what I am doing wrong?

#include "TinyWireS.h"                  // wrapper class for I2C slave routines
#define I2C_SLAVE_ADDR  0x27            // i2c slave address (38)
#include <avr/io.h>
#include <avr/interrupt.h>

//----TIMERS----------------------------------------
void initTimerCounter1(void);
volatile bool decisor = false;
int counter=0;

//---------ADC cycle control -------------------------------------------------
int analogInPin = A3;              // ATtiny Pin 2
int bigdata[104];
int position_control=0;

//----------------------------------------------------
//Variables used in getting and parsing data.
char rxChrData; //Receives the data.
char rxString[12];  //Variable for holding one string of data.
int rxIndex = 0; //Used to index rxString.

// Default buffer size.
#ifndef TWI_RX_BUFFER_SIZE
#define TWI_RX_BUFFER_SIZE ( 16 )
#endif

void setup(void){
    pinMode(4, OUTPUT);  //pin3
    pinMode(1,OUTPUT);   // pin6
    digitalWrite(4, HIGH);
    TinyWireS.begin(I2C_SLAVE_ADDR);      // init I2C Slave mode
    TinyWireS.onReceive(receiveEvent); 
    TinyWireS.onRequest(requestEvent);
}

void loop(void){
  TinyWireS_stop_check();
  
  if(counter==104){
    stopTimerCounter1();
    counter=0;
    }
  
  if(decisor==true){
    counter=0;
    initTimerCounter1();
    digitalWrite(4, LOW);
    decisor=false;
    }
    
  if(position_control==104){  //control variable to send data onRequest
    position_control=0;
  }

}

void requestEvent(){
  digitalWrite(1, HIGH);

  uint8_t buffer[2];
  int help=position_control+8;
  
  for(int i=position_control;i<(help);i++){
     buffer[0] = bigdata[i]>> 8;
     buffer[1] = bigdata[i] & 0xff;
     TinyWireS.send(buffer[0]);
     TinyWireS.send(buffer[1]);
     position_control++;
   }
  digitalWrite(1, LOW);
}

//Handles receiving i2c data.
void receiveEvent(uint8_t howMany)
{
    digitalWrite(1, HIGH);

    if (TinyWireS.available()){  
      if (howMany < 1)
      {   // Sanity-check
          return;
      }
      if (howMany > TWI_RX_BUFFER_SIZE)
      {   // Also insane number
          return;
      }
      while(howMany--)
      {   //Gets i2c data. 
          rxChrData = TinyWireS.receive();
          if (rxChrData == '1'){ // Set speed
              //position_control=0;
              rxIndex = 0;  
         }
         else if (rxChrData == '7'){  // Set direction 1
              decisor=true;
              rxIndex = 0;
         }
         else {
              rxString[rxIndex] = char(rxChrData);
              rxIndex++;
         }
      }
    }
        digitalWrite(1, LOW);

}


void initTimerCounter1(void){
    TCCR1 = 0;                  //stop the timer
    TCNT1 = 0;                  //zero the timer
    GTCCR = _BV(PSR1);          //reset the prescaler
    OCR1C = 246;                //set the compare value 0...255
    TIMSK = _BV(OCIE1B);    //interrupt on Compare Match A
    
    //start timer, ctc mode, prescaler clk
    //TCCR1 = _BV(CTC1) | _BV(CS13) | _BV(CS11)| _BV(CS10) ;
    TCCR1 = _BV(CTC1) | _BV(CS13) ;
    sei();
}

void stopTimerCounter1(void){
  TCCR1 = 0;                  //stop the timer
  TCNT1 = 0;                  //zero the timer
  GTCCR = _BV(PSR1);          //reset the prescaler
}

ISR(TIMER1_COMPB_vect){
  bigdata[counter]=analogRead(analogInPin); // Read analog voltage on pin 2 (A1)
  counter++;
  if(PINB4) PINB |= _BV(PINB4); 
  else PINB = _BV(PINB4);
 
}