Stepper Motors Problem
magicmetal
Posts: 3
I am not a programmer. Four years ago I built a simple servo motor demo board for my art students using a BASIC STAMP 2 and a UNL2803A ic to drive TWO small mitsumi stepper motors. At the time I downloaded some code that made the motors rotate back and forth and then repeat the motion over and over again. I no longer have that code. Could anyone either write me a simple sketch or direct me to a site that has some sample code that I could download. Here is an attachment with a image of my board.
Here is some code I have but it seem to only run one of the two stepper motors
'{$STAMP BS2}
'{$PBASIC 2.0}
loop VAR Nib
delay VAR Byte
DIRB = %1111
delay = 400
start
FOR LOOP = 1 TO 30
OUTB = %0101
PAUSE delay
OUTB = %1001
PAUSE delay
OUTB = %1010
PAUSE delay
OUTB = %0110
PAUSE delay
PAUSE 200
NEXT
Here is some code I have but it seem to only run one of the two stepper motors
'{$STAMP BS2}
'{$PBASIC 2.0}
loop VAR Nib
delay VAR Byte
DIRB = %1111
delay = 400
start
FOR LOOP = 1 TO 30
OUTB = %0101
PAUSE delay
OUTB = %1001
PAUSE delay
OUTB = %1010
PAUSE delay
OUTB = %0110
PAUSE delay
PAUSE 200
NEXT
Comments