Unipolar Stepper Motor #27964 Programming Problems
Archiver
Posts: 46,084
Hi i'm programming on a Basic Stamp 2 and my problem is with the
sample program given. When I run the program, the stepper motor
steps 4 times each iteration through the loop instead of just once.
Also the program runs non-stop when the growbot is set to the
programming mode.
The program code is:
loop var nib
delay var byte
dirb = %1111
delay = 2000 'slow the step speed
start
for loop = 1 to 10 'do this 'loop' 10 times
outb = %0101 'I/O pins 0 and 2 high
pause delay
outb = %1001 'I/O pins 0 and 3 high
pause delay
outb = %1010 'I/O pins 1 and 3 high
pause delay
outb = %0110 'I/O pins 1 and 2 high
pause delay
pause 2500
next
stop
Any help would be greatly appreciated,
Jerome
sample program given. When I run the program, the stepper motor
steps 4 times each iteration through the loop instead of just once.
Also the program runs non-stop when the growbot is set to the
programming mode.
The program code is:
loop var nib
delay var byte
dirb = %1111
delay = 2000 'slow the step speed
start
for loop = 1 to 10 'do this 'loop' 10 times
outb = %0101 'I/O pins 0 and 2 high
pause delay
outb = %1001 'I/O pins 0 and 3 high
pause delay
outb = %1010 'I/O pins 1 and 3 high
pause delay
outb = %0110 'I/O pins 1 and 2 high
pause delay
pause 2500
next
stop
Any help would be greatly appreciated,
Jerome