Line 280... |
Line 280... |
280 |
|
280 |
|
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.Reset() |
286 |
X.Reset() |
286 |
X.Initialize() |
287 |
X.Initialize() |
287 |
X.Float(hard=False) # release power |
- |
|
288 |
print "Stopping the motor." |
288 |
print "Stopping the motor." |
289 |
|
289 |
|
290 |
except KeyboardInterrupt: |
290 |
except KeyboardInterrupt: |
291 |
print "stop" |
291 |
print "stop" |
292 |
X.Float(hard=False) # release power |
292 |
X.Float(hard=False) # release power |