Line 281... |
Line 281... |
281 |
if running == True: |
281 |
if running == True: |
282 |
real_speed = X.Run(direction, requested_speed) |
282 |
real_speed = X.Run(direction, requested_speed) |
283 |
print "Motor running at: %f steps/s" % real_speed |
283 |
print "Motor running at: %f steps/s" % real_speed |
284 |
else: |
284 |
else: |
285 |
X.Float(hard=False) # release power |
285 |
X.Float(hard=False) # release power |
286 |
time.sleep(1.0) |
286 |
time.sleep(1.8) # wait for motor stop |
287 |
X.Reset() |
287 |
X.Reset() |
288 |
X.Initialize() |
288 |
X.Initialize() |
289 |
print "Stopping the motor." |
289 |
print "Stopping the motor." |
290 |
|
290 |
|
291 |
except KeyboardInterrupt: |
291 |
except KeyboardInterrupt: |