user38185: I connected my "arduino(nano)" to "water flow sensor" and wrote a code which simply prints the readings like 0-1023 and tested it. First i got the readings but now i'm not getting it.

My code looks something like this.
void setup(){
 Serial.begin(115200);
}

void loop(){
 int vla=analogRead(2);
 Serial.println(vla);
 delay(1500);
}

and my connection.

Sensor to Supply module 
  Vcc -->  5v 
  Gnd -->  Gnd 
Sensor to Arduino(Nano)
  Sig --> D2


user26916: 
Sensor to Arduino(Nano)
  Sig --> D2

Your connections are wrong.
int vla=analogRead(2);

is reading from analog channel 2, which is pin A2 on your Nano, not D2
D2 is not an analog pin and thus you can't use it with analogRead().

38185: <p>I connected my "arduino(nano)" to "water flow sensor" and wrote a code which simply prints the readings like 0-1023 and tested it. First i got the readings but now i'm not getting it.
<br>
My code looks something like this.</p>

<pre><code>void setup(){
 Serial.begin(115200);
}

void loop(){
 int vla=analogRead(2);
 Serial.println(vla);
 delay(1500);
}
</code></pre>

<p>and my connection.</p>

<blockquote>
  <p>Sensor to Supply module<br> 
  Vcc -->  5v <br>
  Gnd -->  Gnd <br></p>
  
  <p>Sensor to Arduino(Nano)<br>
  Sig --> D2<br></p>
</blockquote>
 26916: <blockquote>
  <p>Sensor to Arduino(Nano)
  Sig --> D2</p>
</blockquote>

<p>Your connections are wrong.</p>

<pre><code>int vla=analogRead(2);
</code></pre>

<p>is reading from analog channel 2, which is pin A2 on your Nano, not D2</p>

<p>D2 is not an analog pin and thus you can't use it with <code>analogRead()</code>.</p>
