Help with easy driver for stepper motors

I can tell you i know the basic of basic arduino code for stepper motor movement. I'm using a nano with a A3967 easy driver . before i start begging for help with code i need to find out if what i have will do what i need it to do. I want to use a button reference to start to turn the motor aprox 1/2 turn and stop or hold (never more) that position while the button is being pressed. once the button is released i need the stepper to reverse and go back to original or home position wait approximantly 30 seconds and then sleep for minutes, hours, days poss weeks until the button is pressed again and/or wake up to move forward. my question is knowing that i have plenty of power can the nano be programmed to move forward- backward -sleep and wake up all with the same button? the forward is as the button is held but once the button is released (even if it has not made its total distance) reverse back to "0" position. if anybody can help i would greatly appreciate it if you could email me so i can pick your brain.

Thank You for reading
Kevin
kgrech17@yahoo.com

You need to think more carefully about how to present stuff. What you have written in the Original Post is almost unintelligible. Isn't it much easier to understand when a little white space is added - like this

I can tell you i know the basic of basic arduino code for stepper motor movement. I'm using a nano with a A3967 easy driver . before i start begging for help with code i need to find out if what i have will do what i need it to do.

I want to use a button reference to start to turn the motor aprox 1/2 turn and stop or hold (never more) that position while the button is being pressed. once the button is released i need the stepper to reverse and go back to original or home position wait approximantly 30 seconds and then sleep for minutes, hours, days poss weeks until the button is pressed again and/or wake up to move forward.

my question is knowing that i have plenty of power can the nano be programmed to move forward- backward -sleep and wake up all with the same button?

the forward is as the button is held but once the button is released (even if it has not made its total distance) reverse back to "0" position.

if anybody can help i would greatly appreciate it if you could email me so i can pick your brain.

Nobody is going to email you. That is not how the Forum works

And the answer is YES, a Nano can be programmed to do what you want. The important thing is that none of your code should block the detection of the state of the button - so don't use delay() and don't use FOR or WHILE unless they can complete in about a few millisecs or less.

...R
Stepper Motor Basics
Simple Stepper Code

The first question you need to answer is WHY are you using a stepper motor that can be positioned precisely to move "approx 1/2 turn".

The second question you need to answer is how you intend to power the stepper motor.

You are worried about sleeping the microcontroller, yet are using a stepper motor which has a
huge power consumption when stationary.

Perhaps start again and describe what you are trying to achieve, rather than how you think it should
be achieved. Stepper motor may be the wrong approach.

xyproblem.info

Thank you for your replies

the stepper motor is perfect for what i am going to do with it. As for powering the motor i have a ac to dc `12volt 5a power supply. and because i have a3967 easy driver that comes with a pin called sleep witch will cut power to the motor only as i understand it.

It also has an enable pin that shuts the motor and easy driver board down to conserve power. Im not worried about power at this time. my only fear is about leaving power to the motor creating a lot of heat. if i cant figure out how to put it to sleep and wake when needed this project will come to an end.

I

kgrech17:
my question is knowing that i have plenty of power can the nano be programmed to move forward- backward -sleep and wake up all with the same button? << answered with a β€œYES”.
the forward is as the button is held but once the button is released (even if it has not made its total distance) reverse back to β€œ0” position.

if(button is high)
{
wake up ur nano or motor
do ur 1/2 thing here
}
else
do ur reference postion
sleep

The code above is a logicaly described.
And as u described the power is not an issue for u, but the over heating of the motor the thing is when the motor is in sleep mode the power will go lower then the heat will low down as will there is some drivers that give an option of 90% power saving.
I think this post may help you https://forum.arduino.cc/index.php?topic=416327.0