move.py move the pen up, down, left and right usage, move at 5cm increemnts: $ python move.py 5 ''' import sys import erik p = erik.Plotter( # hard to measure solo #160.97 159.5 # height doesn't really matter #, 3*12*2.54 , 160.97 # caliper-measured , 1.375, speed=3, serial_path='/dev/serial/by-id/usb-SchmalzHaus_EiBotBoard-if00') move_distance = float(sys.argv[1]) position = p.position while (1): direction = raw_input('specify a direction (udrl): ') # adjust the desired x,y coordinates of the pen head if direction == 'd':
import erik if '--simulate' in sys.argv: simulate_plot = True else: simulate_plot = False p = erik.Plotter( # motor separation..still not quite sure this is right 160.97 # height is arbitrary but seems to affect the skew of things , 160.97 # caliper-measured motor radius , 1.375 # path to my controller , serial_path='/dev/serial/by-id/usb-SchmalzHaus_EiBotBoard-if00' # simulating this run? , simulate=simulate_plot) units = float(sys.argv[1]) scaling = float(sys.argv[2]) # initialize the side length side_length = scaling while (1):