const int leftLimitSwitch = 6;
const int rightLimitSwitch = 5;
const int joystickSwitch = 4;
const int stepPin = 3;
const int dirPin = 2;
#define JOYSTICK_VERT A0
#define JOYSTICK_HORZ A1
void setup(){
Serial.begin(9600);
pinMode(leftLimitSwitch,INPUT_PULLUP);
pinMode(rightLimitSwitch,INPUT_PULLUP);
pinMode(joystickSwitch, INPUT);
pinMode(stepPin, OUTPUT);
pinMode(dirPin, OUTPUT);
}
void loop(){
int vertVal = analogRead(JOYSTICK_VERT);
int horzVal = analogRead(JOYSTICK_HORZ);
Serial.print(vertVal);
Serial.print(" , ");
Serial.println(horzVal);
delay(1000);
}