I am wiring a raspberry pi to a polulu (12V stepper motor, as per the diagram in this page, http://www.pololu.com/picture/view/0J4124
I just wanted to know how I could test using python code. Would something like this below work ??
Should I put in a for loop ?? Or should I input a particular sequence for it to work?
I am basically making it start when a switch is pressed, and close when another switch is closed.
GPIO.setup(STEP, GPIO.OUT)
GPIO.setup(DIR, GPIO.OUT)
GPIO.output(DIR, HIGH)
GPIO.output(STEP, HIGH)
time.sleep(1)
GPIO.output(STEP, LOW)
time.sleep(1)
GPIO.output(STEP, HIGH)
time.sleep(1)
GPIO.output(STEP, LOW)