   delay(100);
 
   for (int i=0;i<sensor_SIZE;i++){
-
     A_Values[i] = 1023-analogRead(sensorPins[i][0]); //Attention à corriger ça
   }
 

#include <Wire.h>

#define ARRAY_LENGTH(x)  (sizeof(x) / sizeof((x)[0]))

//#define LOG_SERIAL
#define HARDCODEDADRESS 8
//TODO 
//
// store read frequency in EEPROM

  Serial.println();
#endif

  delay(A_Values_Period - 2*timeWithCurrent);

#endif
}

void requestEvent()
{ 
  switch (last_command){

  case COMMAND_READ_SENSORS:
    writeSensorsAsBytes();
    break;

  case COMMAND_GET_PERIOD:
    writePeriodAsBytes();
    break;
  }

  last_command = -1;
}


void receiveEvent(int len){
  if(Wire.available()){
    last_command = Wire.read(); 
  }

  switch (last_command){
  case COMMAND_SET_PERIOD:
    A_Values_Period = readLong();
    writeLongInEEPROM(1, A_Values_Period);
    asm volatile ("  jmp 0");
    break;
  
  case COMMAND_SET_ADRESS:
    i2cAdress = readLong();
    writeLongInEEPROM(5, i2cAdress);
    asm volatile ("  jmp 0");
    break;
  }
}

/* Replies to request */

// COMMAND_READ_SENSORS
void writeSensorsAsBytes(){
  int bufferSize = sizeof(int)*(sensor_SIZE)+sizeof(long);
  byte buffer[bufferSize];

