stepper code help

I have two questions. first, I wrote code to go ccw 3 revolutions, then cw 2 revolutions, then ccw 1 revolution, then slowly go about 1/8 revs to the right. I know there has got to be a better way to do the slower rotation at the end. anyone?

// using AutomationDirect.com Surestep stp-drv-6575 driver
// motor_current 100%  load_inertia_5-10x idle_off stepsperrev_2000 current_2.8 
// step_pulse_type set to Step and direction.  Step pulse noise filter set to 150khz
// stepper - stp-mtr-23055d
// power supply - meanwell se-450-48  48V,9.4A
#include <Stepper.h>

Stepper myStepper(300, 3,5); // step,dir           

void setup() {
  
  myStepper.setSpeed(1500);

}

void loop() {
   myStepper.step(-24000);
  delay(250);
  
  myStepper.step(16000);
  delay(250); 

  myStepper.step(-8000);
  delay(250);

myStepper.step(100);
delay(20);
myStepper.step(100);
delay(20);
myStepper.step(100);
delay(20);
myStepper.step(100);
delay(20);
myStepper.step(100);
delay(20);
myStepper.step(100);
delay(20);
myStepper.step(100);
delay(20);
myStepper.step(100);
delay(20);
myStepper.step(100);
delay(20);
myStepper.step(100);
delay(20);
myStepper.step(100);
delay(20);
myStepper.step(100);


delay(1250);

myStepper.step(-1200);
}

what this newbie is trying to do in the end is write a code to make the stepper basically run through all 216,000 combinations on a safe with a 60 number dial. The thing is neither my uno nor my leo was enough program room to do it manually. anyone have any suggestions on arrays, or random numbers or anything. I am very new to programming so any thoughts would be great.

Why don't you use "myStepper.setSpeed(xxx);" to set a slower speed for the stepper?

Are you trying to use an Arduino to open a safe illegally?

If there is not enough memory in the Arduino to store all the moves you could send the data piece by piece to the Arduino from a PC.

...R

can I change the setspeed in the loop? i want it to run the other positions at full speed.
even at the speed im getting per routine 216,000 combos is going to take like 18 days.
the safe is a friend of mine who forgot the combo and still wants to use it so destroying it isnt an option. (he says cant be cut, I think it can). neways how would i send the commands to it piece by piece as you say. through the serial monitor?

Yes you can change the speed when you want.

If you stick with the existing method you should learn about for-loops...

How will you know when you get the correct combination?

Burglars don't spend 18 days opening safes. There is probably a more efficient way.

...R

my friend told me that when the right combo is entered you turn the dial to the right and the lock gate lifts and the dial stops moving. I plan to mount the motor on a spring loaded swivel that will stay put under normal dialing and when the dial locks the tension will rotate the motor and swivel mount opening (or closing) a switch that i set to one of the controllers enable pins turning off the motor. works in my head just got to figure out how to code the 216,000 ints.

I hope your friend is paying you well for saving him the expense of buying a new safe.

...R

not in it for the money,(hes not paying me.) When I was younger( 13 or 14, now im 35) i wanted a BASIC STAMP. at i think 100 bucks i couldnt pay for it. now i can and the arduino is cheap. got one UNO and two LEO's. i love the whole concept of having programmable portable device. no i just have to learn to code. tried before but was boring, hopeing the whole kind of wysiwyg helps.

Is there any way you could post a photo of your circuit (specifically the connection from the driver to arduino)? I'm not sure what each of the pins should be connected to (fault +/-, en +/-, dir +/-, Step +/-).

@bajack96, this Thread is 4 years dead.

Start your own Thread and when you do tell us as much as you can about your project and, in particular post a link to the datasheet for your stepper motor and tell us what stepper motor driver you are using.

...R
Stepper Motor Basics
Simple Stepper Code

no i just have to learn to code. tried before but was boring

I'm afraid you're out. Either you find any step in learning to code thrilling or then it's just not your thing. Even fooling oneself into being excited works.

What's the thing with storing 216.000 ints anywhere? What are they?