title: Arduino While loop and if statement logic
body: <p>Looking for some help with some loop logic. Right now, this just gets stuck in a while loop but doesn't break. Mostly just curious, but how could I do this so the Serial write continues to just write every time, but the lightThis() function is only called once? </p>
  
  <pre><code>void loop(){
      if ( (x &gt;= 245 &amp;&amp; x &lt;= 260) &amp;&amp; (accelDifference &gt; STAB_THRESHOLD)){
      // write a command to serial
      Serial.print("p1stab");
  
      // trace this for now
      Serial.print("\t");
      Serial.print(x);
      Serial.print("\t");
      Serial.print(y);
      Serial.print("\t");
      Serial.print(z);
      Serial.print("\n");
  
      // keep the LED solid 
      while(true) {
          lightThis();
          if (false){
              break;
          }
      }
  
      } else {
          Bean.setLed(0, 0, 0);
      }
  
  }
  </code></pre>
  
  <p>Thanks!</p>