steppers tracking a satellite trajectory

hi all, Im here to try and see if i can get some help on programming the arduino to resolve 2 values, basically 2 angles, (Azymuth and Elevation) into the proper steps each motor should take (X and Y).

So far i got the steppers to move to manual input via serial, I can get the proper number of steps to do say a 180° degrees turn = 24steps.

The problem is i lack the skills to code the progressive increment so to be able to follow a path.

say, every 2 seconds i will get a new set of angles, they will be increasing or decreasing by units so this should be simple.

i,e:

  1. AZ180, EL45 = 24, 12
  2. AZ181, EL44...
  3. AZ182, EL42.....

I know this is dead simple for an average coder, but im not even a noob so any hint, code example or url to a good ref is appreciated!

/a

Well I'm also still learning C coding so can't supply you with a sketch. However if I was taking on such a project I would try and utilize one of the user contributed libary called Mstimer2:

http://www.arduino.cc/playground/Main/MsTimer2

This routine allows you to set up a automatic interrupt to occur at any recurring time, say 2 seconds per your suggestion. Every 2 second the timer would jump to a function you have written to handle stepping your motors.

Read the example sketch in the link above and think what you could do by writing a different function then the one named flash, you could call it nextstep :wink:

Lefty

eia lefty! reading now on MsTimer2, thanks for the headsup.

I have also to solve how to get the data from the tracking application into the serial line. Since most of the satellite tracking applications are written for windoes and Im currently using a mac, im forced to ran them via WINE and is often the case that serial communication fails.

will read on and post back with the findings.

tx
/a