Manual Rotator Control

/*
  DigitalReadSerial
 Reads a digital input on pin 2, prints the result to the serial monitor 
 
 This example code is in the public domain.
 */

// digital pin 2 has a pushbutton attached to it. Give it a name:
int rotate_cw = 6;
int rotate_ccw = 7;
int analog =0;

// the setup routine runs once when you press reset:
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
  // make the pushbutton's pin an input:
  pinMode(rotate_cw, OUTPUT);
  pinMode(rotate_ccw, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input pin:
  digitalWrite(rotate_cw,HIGH);
  analog=analogRead(A0);
  Serial.print("CW  ");
  Serial.println(analog);
  delay(2000);
  analog=analogRead(A1);
  digitalWrite(rotate_cw,LOW);
  Serial.print("stop  ");
  Serial.println(analog);
  delay(8000);
  digitalWrite(rotate_ccw,HIGH);
  Serial.println("CCW \n");
  delay(2000);
  digitalWrite(rotate_ccw,LOW);
  Serial.println("stop \n");
  delay(8000);
  // print out the state of the button:
//  Serial.println(buttonState);
  //delay(1000);        // delay in between reads for stability
}