pyRepRap - Reprap Python Module February 11, 2008 02:19PM |
Registered: 17 years ago Posts: 161 |
import serial, reprap, time # Import the reprap and pySerial modules. reprap.serial = serial.Serial(0, 19200, timeout = reprap.snap.messageTimeout) # Initialise serial port, here the first port (0) is used. reprap.cartesian.x.active = True # These devices are present in network, will automatically scan in the future. reprap.cartesian.y.active = True reprap.cartesian.z.active = True reprap.extruder.active = True # The module is now ready to recieve commands # moveSpeed = 220 reprap.cartesian.homeReset( moveSpeed, True ) # Send all axies to home position. Wait until arrival. reprap.cartesian.seek( (1000, 1000, 0), moveSpeed, True ) # Seek to (1000, 1000, 0). Wait until arrival. time.sleep(2) # Pause. reprap.cartesian.seek( (500, 1000, 0), moveSpeed, True ) # Seek to (500, 1000, 0). Wait until arrival. time.sleep(2) reprap.cartesian.seek( (1000, 500, 0), moveSpeed, True ) # Seek to (1000, 500, 0). Wait until arrival. time.sleep(2) reprap.cartesian.seek( (100, 100, 0), moveSpeed, True ) # Seek to (100, 100, 0). Wait until arrival. reprap.cartesian.homeReset( moveSpeed, True ) # Send all axies to home position. Wait until arrival. reprap.cartesian.free() # Shut off power to all motors.
Re: pyRepRap - Reprap Python Module February 13, 2008 10:34AM |
Admin Registered: 17 years ago Posts: 1,487 |
Re: pyRepRap - Reprap Python Module February 13, 2008 11:31AM |
Registered: 16 years ago Posts: 447 |
Re: pyRepRap - Reprap Python Module February 13, 2008 05:37PM |
Re: pyRepRap - Reprap Python Module April 13, 2008 05:25AM |
Re: pyRepRap - Reprap Python Module April 16, 2008 05:24PM |
Registered: 17 years ago Posts: 161 |
Re: pyRepRap - Reprap Python Module April 18, 2008 02:49AM |
Registered: 16 years ago Posts: 213 |
Re: pyRepRap - Reprap Python Module April 18, 2008 01:16PM |
Registered: 17 years ago Posts: 161 |
Re: pyRepRap - Reprap Python Module February 08, 2010 11:32PM |