Reduce the Max speed in Elevation axis and change the default state of home sensor (end stops).

v1
Agis Zisimatos 2015-02-09 18:54:11 +02:00
parent d6ce4994f4
commit 7e4fa6697b
1 changed files with 5 additions and 5 deletions

View File

@ -37,7 +37,7 @@ void setup()
AZstepper.setAcceleration(200);
/*Change these to suit your stepper if you want*/
ELstepper.setMaxSpeed(400);
ELstepper.setMaxSpeed(200);
ELstepper.setAcceleration(200);
/*Enable Motors*/
@ -60,7 +60,6 @@ void loop()
/*Define the steps*/
static int AZstep = 0;
static int ELstep = 0;
/*Time Check*/
if (t_DIS == 0)
t_DIS = millis();
@ -97,13 +96,14 @@ void Homing(int AZsteps, int ELsteps)
{
value_Home_AZ = digitalRead(HOME_AZ);
value_Home_EL = digitalRead(HOME_EL);
if (value_Home_AZ == LOW)
/* Change to LOW according to Home sensor */
if (value_Home_AZ == HIGH)
{
AZstepper.moveTo(AZstepper.currentPosition());
isHome_AZ = true;
}
if (value_Home_EL == LOW)
/* Change to LOW according to Home sensor */
if (value_Home_EL == HIGH)
{
ELstepper.moveTo(ELstepper.currentPosition());
isHome_EL = true;