I'm using an arduino uno with the basic "DigitalReadSerial" setup as outlined here: http://arduino.cc/en/Tutorial/DigitalReadSerial
If i use the serial monitor included with the arduino IDE, it immediately displays any changes from pressing the button.
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)
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.
import serial
ser = serial.Serial()
ser.setPort("COM2")
ser.baudrate = 9600
ser.open()
while 1==1:
ser.readline()
Does anyone have any ideas?