 
 }
 
+void intToByte(unsigned int value, byte *buffer){
+  for (int i = 0;i<sizeof(int);i++){
+    buffer[i] = value >> ((sizeof(int)-1-i)*8);
+  }
+}
+
+void longToByte(unsigned long value, byte *buffer){
+  for (int i = 0;i<sizeof(long);i++){
+    buffer[i] = value >> ((sizeof(long)-1-i)*8);
+  }
+}
 
 
 
 
+
+
+
+

  Serial.println();
#endif

  delay(900); // ici  ~ une seconde est passé + quelques microsecondes
  delay(60*1000); // 1 min de pause
}

void requestEvent()
{
  byte buffer[12];

  for (int i=0;i<sensor_SIZE;i++){
    buffer[2*i] = A_Values[i] >> 8;
    buffer[2*i+1] = A_Values[i] & 0xff;
  }

  Wire.write(buffer, 12);
}




const int sensor_SIZE = ARRAY_LENGTH(sensorPins);
unsigned int A_Values[sensor_SIZE];
unsigned long A_values_timestamp;

const int addressPins[] = {
  6,7,8,9};
