1st post attempt failed so this one is not as long winded
This code
from firmata import *
import time
a = Arduino("COM32", baudrate=57600) # Baudrate must match rate set in sketch
#time.sleep(3)
a.pin_mode(12, firmata.OUTPUT)
print "wait"
time.sleep(2)
print "Go"
b=1
while True:
a.digital_write(12, firmata.HIGH)
time.sleep(1)
a.digital_write(12, firmata.LOW)
time.sleep(1)
print "count" , b
b= b +1
#a.serial.close()
Stops after 5 counts - ctrl-c takes tens secs to hand back control and then it give this
Traceback (most recent call last):
File "E:\Dropbox\Private\arduino\py\firmatatest.py", line 12, in <module>
a.digital_write(12, firmata.HIGH)
File "build\bdist.win32\egg\firmata\firmata.py", line 91, in digital_write
self.serial.write(chr(self.digital_output_data[port_number] >> 7))
File "C:\Python27\lib\site-packages\serial\serialwin32.py", line 268, in write
err = win32.GetOverlappedResult(self.hComPort, self._overlappedWrite, ctypes.byref(n), True)
KeyboardInterrupt
any ideas why and what to do about it or alternative working methods of switching pins off and on using Python from Windows?
regards
Simon