title: PySerial delay in reading line from Arduino
body: <p>I'm using an arduino uno with the basic "DigitalReadSerial" setup as outlined here: <a href="http://arduino.cc/en/Tutorial/DigitalReadSerial" rel="nofollow">http://arduino.cc/en/Tutorial/DigitalReadSerial</a></p>
  
  <p>If i use the serial monitor included with the arduino IDE, it immediately displays any changes from pressing the button.</p>
  
  <p>This is what i want in pyserial, either a 0 or a 1 depending on whether the button is pressed. (to eventually trigger a timer)</p>
  
  <p>just to test it, i threw this together, not the prettiest, but it seems to read out the pushbutton state, but there is a 20second delay.</p>
  
  <pre><code>    import serial
      ser = serial.Serial()
      ser.setPort("COM2")
      ser.baudrate = 9600
      ser.open()
      while 1==1:
          ser.readline()
  </code></pre>
  
  <p>Does anyone have any ideas?</p>