title: how to stop a loop arduino
body: <p>I have this loop, how would I end the loop?   </p>
  
  <pre><code> void loop() {
        // read the pushbutton input pin:
  
         a ++;
        Serial.println(a);
          analogWrite(speakerOut, NULL);
  
        if(a &gt; 50 &amp;&amp; a &lt; 300){
        analogWrite(speakerOut, 200);
        }
  
        if(a &lt;= 49){
          analogWrite(speakerOut, NULL);
        }
  
        if(a &gt;= 300 &amp;&amp; a &lt;= 2499){
            analogWrite(speakerOut, NULL);
        }
  </code></pre>