Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jrpixley

Pages: [1]
1
Thanks for your help. I put this in the bottom of the void loop and it resets both az & alt and starts tracking. Also added

  float stop_1 = false;
  float stop_2 = false;


  ///////////////////////////////////////////////////////////////////
  //Send azMotor to it's HOME position when wait for input

   while (digitalRead(LimitPin) == HIGH && !stop_1)
    azMotor->step(1, FORWARD, MICROSTEP);

  if (digitalRead(LimitPin) == LOW)
  {
    stop_1 = true;
    azMotor->step(8, BACKWARD, MICROSTEP);
    altMotor->release();
  }
  /////////////////////////////////////////////////////////////////////
  //Send altMotor to it's HOME position when wait for input

delay (1000);

  while (digitalRead(LimitPin) == HIGH && !stop_2)
    altMotor->step(1, BACKWARD, MICROSTEP);

  if (digitalRead(LimitPin) == LOW)
  {
    stop_2 = true;
    altMotor->step(8, FORWARD, MICROSTEP);
    altMotor->release();
  }

2
Thanks for your help. I may need some more help being I am poor at code. Your code is way  over my head! I have gotten Adafruit Motor/Stepper/Servo Shield for Arduino v2.3 in as far as the first part of moveToPosition functions  with the following.....
 //Code to use Adafruit motor shield library 
  altMotor->setSpeed(altSpeed);
  azMotor->setSpeed(azSpeed);
 
  if (azsteps<0){azMotor->step(abs(azsteps),BACKWARD,MICROSTEP);}
  else {azMotor->step(azsteps,FORWARD,MICROSTEP);}
   
  if (altsteps<0){altMotor->step(abs(altsteps),BACKWARD,MICROSTEP);}
  else {altMotor->step(altsteps,FORWARD,MICROSTEP);}

but when I looked, to modify the findLimits function and tried to understand, I knew I was over my head. I have looked at this for two days. if i get the project working I will show it to you. i hope this is enough tease to get your interest.

     digitalWrite(stepPin, HIGH);
     delayInMicroseconds(MotorDelay);         
     digitalWrite(stepPin, LOW);
     delayInMicroseconds(MotorDelay);

Thanks
 Joe

3
Do I need to input info as south = 0?

4
I would like to use, SunTracking Heliostat Program v098, IDE 1.06 , to run my project. I am using Arudino uno  with a Adafruit Motor/Stepper/Servo Shield for Arduino v2.3 and stepper motors. The part I am having is how change the program
from the way it is to use the motor shield that is i2c ? Any help would would be great.
    I have got it to move with the programing.

I can't understand why program keeps giving neg. az
 my lat 33.00, lon -94.33   

sunearthtools = 115az & 12.76 elev for 8:41

When I run program this is the results.
why am I getting a neg. az?

Time:8:41:02 10/28/15 Day of week:4
sun's Alt: 12.963
Sun's Az: -65.106
Number of Machines 1
Machine Number 0
Machine's alt: 12.963
Machine's az: -65.102
move exceeds bounds

5
I would like to use, SunTracking Heliostat Program v098, IDE 1.06 , to run my project. I am using Arudino uno  with a Adafruit Motor/Stepper/Servo Shield for Arduino v2.3 and stepper motors. The part I am having is how change the program
from the way it is to use the motor shield that is i2c ? Any help would would be great.

Pages: [1]