void setup(){
Serial.begin(9600);
}
void loop(){
long sensorValue=analogRead(A0);
long sum=0;
for(int i=0;i<1000;i++)
{
sum=sensorValue+sum;
sensorValue=analogRead(A0);
delay(2);
}
sum=sum/1000;
Serial.print("if you set the Gain to 10,the input voltage:");
Serial.println(10*sum*4980/1023.00);
Serial.print("if you set the Gain to 3,the input voltage:");
Serial.println(3*sum*4980/1023.00);
delay(1000);
}