Changeset 1096
- Timestamp:
- 11/06/08 14:37:49 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
analog/pyeac/branches/pyeac_pygame/eac_physical.py
r1083 r1096 45 45 def __init__(self,ueac_device='/dev/ttyUSB0',baud=19200): 46 46 try: 47 self.ser = Serial(ueac_device,baud,timeout= 3)47 self.ser = Serial(ueac_device,baud,timeout=10) 48 48 except SerialException: 49 49 print "Error: could not open %s" % ueac_device … … 133 133 def reset(self): 134 134 """ Send the board through a software controlled reset, sets all of the pins back to default voltage input mode""" 135 self.ser.write('foo\n') 136 self.ser.flush() 137 sleep(0.01) 135 138 self.ser.write('rst\n') 136 139 self.ser.flush() 137 self.ser.read(1000) # big read to force timeout140 data = self.ser.read(1000) # big read to force timeout 138 141 139 142 def close_port(self):
