title: How can I run two loops at the same time?
body: <p>I have written code that makes LEDs blinks and moves a servo to several different directions. Here's the basic structure:</p>
  
  <pre><code>  while(true){
      //led on
      //wait
      //led off
      //wait
    }
    while(true){
      //servo to 45
      //servo to 90
      //servo to 270
    }
  </code></pre>
  
  <p>I want both to run at the same time. The code above only turns on the LEDs, and infinitely since it's in the loop. The servo never works. I looked at other questions on here but I couldn't find anything relevant.</p>
  
  <p>How can I make both the LEDs and servo work at the same time?</p>