-
+#include <Wire.h>
 
 double potcurval;    // variable to read the value from the analog pin 
 int angel; //Integer value of angle
- double angle =0;
+double angle =0;
 
- double curangle,kP=28.00,kI=42,kD=4,Last=0;
- double P=0,I=0,D=0,Drive,Error=0,Integral=0;
+double curangle,kP=28.00,kI=42,kD=4,Last=0;
+double P=0,I=0,D=0,Drive,Error=0,Integral=0;
  
 
  void backward() {

    */

}

  // myservo.attach(6);  // attaches the servo on pin 9 to the servo object 
  pinMode(9,OUTPUT);
  pinMode(12,OUTPUT);
  pinMode(11,OUTPUT);
  Wire.begin(2);
  Serial.begin(9600);
} 
 void Errorcalc()
 {
   potcurval=(double)analogRead(A0)+1;
   potcurval=(potcurval/1024)*5;
   curangle=(potcurval/5)*270;
   Error = curangle-angle;
 }
void loop() 
{
  
  Serial.println(angle);  
  
                 Errorcalc();
                if (abs(Error) <.8){ // prevent integral 'windup'
