Hi folks
Need to see if I can get a little help on a stepper project I am working on.
Here is the code I have right now,
It works alright as is but I would like to be able to count the steps or give it a command to go x number of steps then stop. Is this possible to do with a 08M?
I am using a 08M with a ULN2003 to drive the stepper and it is 1.8° per stepper.
I am not very good a writing code but am trying to learn you know old dog new tricks.
Any help will be appreciated.
Thanks
GBlair
KD8ENK
Need to see if I can get a little help on a stepper project I am working on.
Here is the code I have right now,
Code:
main: ‘ make a label called ‘main’
if pin3 = 0 then rstep ‘ If high turn right
if pin3 = 1 then lstep ‘ If high turn left
goto main ‘ else loop back around
rstep: ‘ start a for...next loop
toggle 1 ‘ Toggle pin 1
high 4 ‘ direction indicator right on
pause 1 ‘ Wait 1ms
toggle 2 ‘ Toggle pin 2
pause 1 ‘ Wait 1ms
goto main ‘ goto main
lstep:
toggle 2 ‘ Toggle pin 1
low 4 ‘ direction indicator left off
pause 1 ‘ Wait 1ms
toggle 1 ‘ Toggle pin 2
pause 1 ‘ Wait 1ms
goto main ‘ goto main
I am using a 08M with a ULN2003 to drive the stepper and it is 1.8° per stepper.
I am not very good a writing code but am trying to learn you know old dog new tricks.
Any help will be appreciated.
Thanks
GBlair
KD8ENK