title: flashing led slows down microprocessor
body: <p>I've designed a system, when the resistance of the potentiometre is below a set value, the LED blinks <code>led1 = 1; wait(0.2); led1 = 0 wait(0.2)</code>, this is what occurs. I need both the wait sequences otherwise the user doesn't see any change. I also have an LCD connected, when the user presses buttons the LCD changes to display different things. The problem is that this change in LCD is significantly slowed down to the <code>wait(0.2)</code> statement (0.2second delay). This kind of gives the system a laggy feel. Any ideas what things i can do?</p>
  
  <p><strong>ISR</strong>
  I initially thought about putting the flashing LEDs into an interrupt routine but quickly realized that, if the user didn't change the value of the potentiometre and it was always set to 0, the system would just stay in the ISR. </p>
  
  <p><strong>Polling</strong>
  My second idea was to try polling, make the LED flash every 100th time it came into this function. The results weren't good, it would slow down the system every so often now. When it didn't slow down the system it would go too fast. </p>