Rev 4736 Rev 4737
Line 243... Line 243...
243 try: 243 try:
244 print "Configuring SPI.." 244 print "Configuring SPI.."
245 spi.SPI_config(spi.I2CSPI_MSB_FIRST| spi.I2CSPI_MODE_CLK_IDLE_HIGH_DATA_EDGE_TRAILING| spi.I2CSPI_CLK_461kHz) 245 spi.SPI_config(spi.I2CSPI_MSB_FIRST| spi.I2CSPI_MODE_CLK_IDLE_HIGH_DATA_EDGE_TRAILING| spi.I2CSPI_CLK_461kHz)
246 time.sleep(0.1) 246 time.sleep(0.1)
247   247  
-   248 maximum_speed = 2 * SPEED
-   249  
248 print "Configuring stepper motor.." 250 print "Configuring stepper motor.."
249 X = axis(spi.I2CSPI_SS0, 0, 1, MaxSpeed = 2*SPEED) # set Number of Steps per axis Unit and set Direction of Rotation 251 X = axis(spi.I2CSPI_SS0, 0, 1, MaxSpeed = maximum_speed) # set Number of Steps per axis Unit and set Direction of Rotation
250   252  
251   253  
252 print "Motor speed limit is: %f steps/s" % maximum_speed 254 print "Motor speed limit is: %f steps/s" % maximum_speed
253 running = False 255 running = False
254   256