title: How do i change variable after each 2-3 loops?
body: <p>I have a loop that constantly goes on. I would like to change the variable after each 2-3 loops. Right now, after running the loop, the variable would stay always the same (if I don't change it) or it changes every time. My code:</p>
  <pre><code>#include &quot;VernierLib.h&quot;
  VernierLib Vernier;
  #define led 13
  float sensorReading;
  void setup() {
    Serial.begin(9600);
    Serial.println(Vernier.sensorName());
    Vernier.autoID();
  }
  void loop() { 
    float base_temp = Serial.parseFloat();
    sensorReading = Vernier.readSensor();
    Serial.print(sensorReading);
    Serial.print(&quot; &quot;);
    Serial.println(Vernier.sensorUnits());
    Serial.print(&quot;Želena temperatura: &quot;);
    Serial.println(base_temp);
    if (base_temp &gt; sensorReading) {
      digitalWrite(led, HIGH);
    } else {
      digitalWrite(led, LOW);
    }
    delay(2300);
  }
  </code></pre>