         Wire.begin();
     Wire.beginTransmission(addr);
     Wire.write(data);
-    if(Wire.endTransmission())
+    if(Wire.endTransmission() != 0) {
         return error();
+    }
     return 0; //returns 0 if sent successfully
 }
 


int massChange(int initMass) {
    return massFSR()-initMass;
}
    startTimer();
    int initMass = massFSR();
    while(massChange(initMass)< mass && !maxTimer(P_TIMEOUT));
    if(!send(addr, temp, 2)) {
        error();
    }
    return 0;
}

