I have 12 of these "voids" that are exactly the same,
(void sent1 through void sent12 with different steps)
but my stepper motor moves to a spot then moves back
to a starting location. There is an LED blinking,
a servo movement in between the two step amounts and
a sound that plays when this happens. I am in need of
some code space(almost full) and I think that if I can
make this part shorter than I can get the little bit
of space that I need to finish my project.
I'm not sure what you mean by CODE TAGS. The stepper motor has a starting location that is just a stopping point that it bumps into. From that point the stepper motor moves to 12 different spots. Each one of these voids brings the stepper motor to a position and bring the stepper motor back slightly more so it bumps into the stopping point to create the same starting point. I am trying to write the code that will let me have Only one void instead of 12 that I can just change the stepper motor distance then add 10 steps for the return location to bump into the stopping point.
So if CODE TAGS will help me with this, then I would really appreciate your help.
LOL!!!! Ok, that is good to know. Thanks for letting me know about code tags. If anyone else can help with this code issue, would be wonderful. Thanks.
I just got to work so I can't post my whole code right now. (didn't bring it with me)
Is there some direction that someone could point me so I can research some possibilities to my dilemma.
This way I can learn about the code and not have someone write it 4 me....
The delay is actually in there because when I use my Servo, it will cut my sound off. I think there is a conflict with the libraries or something. So I just put a delay in and attach/detach my servo only when I use the servo in between the two stepper motor distances.
Thanks soo much 4 the sample.... I should have this researched by the time I get home from work.
Why not have one function and store the different values in two arrays? Pass an number (0-11) to the function so it knows which element of the array to use.