i have 2 of these on a camera setup and here is the code i have that runs them off of 1 joystick.
#include <Stepper.h>
const int stepsPerRevolution = 64;
Stepper pan(stepsPerRevolution, 8,10,9,11);
Stepper tilt(stepsPerRevolution, 3,5,4,6);
void setup() {
pan.setSpeed(300); // pan
tilt.setSpeed(300); // tilt
}
void loop() {
int sensorReading = analogRead(A0); // pan
if (sensorReading < 300) { pan.step(4); } // pan left
if (sensorReading > 800) { pan.step(-4); } // pan right
int sensorReading2 = analogRead(A1); // tilt
if (sensorReading2 < 300) { tilt.step(4); } // motion down
if (sensorReading2 > 800) { tilt.step(-4); } // motion up
}
simple and easy
good luck