My Serial monitor isn't functioning it is coded to show me the water levels as an analog output and was functioning well the first tries but know it only shows "o" zero I need help
int pump =2;
int sensorPower =6;
int sensorpin =A0;
int threshold =700;
int waterdelay =750;
int waterpostdelay =5000;
void setup(){
pinMode(sensorpin, INPUT);
pinMode(pump, OUTPUT);
Serial.begin(9600);
}
void loop(){
int SensorValue = analogRead(sensorpin);
if(SensorValue <=threshold){
digitalWrite(pump, HIGH);
delay(waterdelay);
digitalWrite(pump, LOW);
delay(waterpostdelay);
}
else{
digitalWrite(pump, LOW);
}
Serial.print("Analog output: ");
Serial.println(readSensor());
delay(1000);
}
int readSensor() {
digitalWrite(sensorPower, HIGH);
delay(10);
int val =analogRead(sensorpin);
digitalWrite(sensorPower, LOW);
}
```That is the code I used but the serial monitor shows
Analog output : 0 everytime I upload the code