}
delay(500);
}
//program to zero the weight scale
void makezero(){
y=analogRead(s1);
u=y-‐zval;
zval+=u;
eval+=u;
delay(500);
while(1){
weight(); }
}
//displaying the weight, time and flowrate
void weight(){
stime=millis()/1000;
lcd.clear();
y=analogRead(s1);
x=map(y,zval,eval,z,e);
lcd.clear();
lcd.print("Weight:");
if(x<0){
x=0;
}
lcd.print(x);
lcd.print("g");
lcd.setCursor(11,0);
time=stime-‐etime;
lcd.print("T:");
lcd.print(time);
lcd.print("s");
space();
lcd.setCursor(0,1);
lcd.print("Flow:");
flow=x/time;
lcd.print(flow);
lcd.print("ml/s");
delay(500);
}
//line space
void space(){
lcd.print(" ");
}