Hy Folks
I am very new in Arduino, and I dont understand lot of relations in programing. Of course I am not native English, and please apologize for grammatic mistakes.
My plan is to make a power press feeder with accel stepper. I download the sketch(basic) and its really work good with stepper motor. Up to now I used Mach3 for that job, but for the Mach 3 is needed a PCand Monitor, and its quite big.
What is the plan?
The program needed to have LCD(16/2) with buttons to set the value(steps).(distance to go)
Also a start button for starting the motor each time.
The motor is need to move only in forward, cancel the value, and move again, an again.
Is that simple? For me its not.
Here is the sketch what I used:
#include <AccelStepper.h>
// Define a stepper and the pins it will use
AccelStepper stepper(AccelStepper::DRIVER, 9, 8);
int pos = 3600;
void setup()
{
stepper.setMaxSpeed(3000);
stepper.setAcceleration(1000);
}
void loop()
{
if (stepper.distanceToGo() == 0)
{
delay(500);
pos = -pos;
stepper.moveTo(pos);\
}
stepper.run();
}
Thank you for helping.
Arpad