void loop() { scale.set_scale(calibration_factor); //We are adjusting the calibration factor Serial.print("Reading Values "); Serial.print(scale.get_units(), 3); Serial.print(" kg"); //Changing this unit to KG to follow SI units Serial.print(" calibration_factor: "); Serial.print(calibration_factor); Serial.println(); if(Serial.available()) //Applying the condition to check if something is entered on the serial or not { char temp = Serial.read(); //Reading the value entered on the serial monitor if(temp == '+' || temp == 'a') calibration_factor += 10; //Applying if statements to increase or decrease the calibration factor according to requirement else if(temp =='-' || temp == 'e') calibration_factor -= 10; else if(temp == 'b') calibration_factor += 100; else if(temp == 'f') calibration_factor -= 100; else if(temp == 'c') calibration_factor += 1000; else if(temp == 'g') calibration_factor -= 1000; else if(temp == 'd') calibration_factor += 10000; //Calibration factor will increase or decrease according to the key pressed else if(temp == 'h') calibration_factor -= 10000; //Once we get right value of the weight placed we simplyset that thing as calibration factor else if(temp == 't') scale.tare(); } }