<commit_before>#include<Wire.h>
#include <btz_i2c.h>

 
int counter = 2000;
long lastTimeCounterTriggered = 0;
long lastTimeLogChanged =0;
long lastLogLength =0;
char mode = 'n';
Btz_i2c i2c_driver = Btz_i2c();
i2c_reg _register[2];
i2c_reg _reg1, _reg2;
/*I2C Bridge*/
void i2c_onReceive(int n){i2c_driver.OnReceive(n);}
void i2c_onRequest(){i2c_driver.OnRequest();}

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  Serial.println("setup register...");
  GenRegister();
  Serial.println("init i2c_driver");
  //Init driver with slave address 0x12, our pointers and the length of these register_array 
  i2c_driver.Initialize(0x12,_register,0x2); 
  //Setup bridge
  Wire.onRequest(i2c_onRequest);
  Wire.onReceive(i2c_onReceive);
  Serial.println("Driver Initialized");
  
}

void loop() {
  // put your main code here, to run repeatedly:
  long now = millis();
  if((now -  lastTimeLogChanged) >= 50)
  {
    counter++;
    Serial.println(counter);
    if(i2c_driver.log.length() != lastLogLength)
    {
      //Serial.println(i2c_driver.log);
      lastLogLength = i2c_driver.log.length();
    }
    lastTimeLogChanged = now;
  }
}
void **testArray;
void GenRegister()
{
  _reg1.dataType = DT_INT;
  _reg1.valuePointer = &counter;

  _reg2.dataType = DT_BYTE;
  _reg2.valuePointer = &mode;

  _register[0] = _reg1;
  _register[1] = _reg2;
  
}<commit_msg>arduino test adjusted<commit_after>#include<Wire.h>
#include <btz_i2c.h>

 
Btz_i2c i2c_driver = Btz_i2c();
i2c_reg _register[2];
i2c_reg _reg_int, _reg_chrarry;
long lastLog = 0;
long lastLogLength = 0;
int int_reg_val = 999;
char chrarry_reg_val[6] = {0x1,0x2,0x3,0x4,0x5,0x6};
/*I2C Bridge*/
void i2c_onReceive(int n){i2c_driver.OnReceive(n);}
void i2c_onRequest(){i2c_driver.OnRequest();}

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  Serial.println("setup register...");
  GenRegister();
  Serial.println("init i2c_driver");
  //Init driver with slave address 0x12, our pointers and the length of these register_array 
  i2c_driver.Initialize(0x12,_register,0x2); 
  //Setup bridge
  Wire.onRequest(i2c_onRequest);
  Wire.onReceive(i2c_onReceive);
  Serial.println("Driver Initialized");
  
}

void loop() {
  // put your main code here, to run repeatedly:
  long now = millis();
  if((now -  lastLog) >= 200)
  {
    if(i2c_driver.log.length() != lastLogLength)
    {
      Serial.println(i2c_driver.log);
      lastLogLength = i2c_driver.log.length();
    }
    lastLog = now;
  }
}

void GenRegister()
{
  _reg_int.dataType = DT_INT;
  _reg_int.valuePointer = &int_reg_val;

  _reg_chrarry.dataType = DT_CHRARY;
  _reg_chrarry.valuePointer = chrarry_reg_val;

  _register[0] = _reg_int;
  _register[1] = _reg_chrarry;
  
}
{'fraction_non_alphanumeric': 0.1339124140427072, 'fraction_numerical': 0.03836409699601882, 'mean_word_length': 4.2052730696798495, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4148247', 'n_tokens_mistral': 1130, 'n_tokens_neox': 1088, 'n_words': 217}