 #include <Wire.h>
 
+
 double potcurval;    // variable to read the value from the analog pin 
-int angel; //Integer value of angle
+
 double angle =0;
 
 double curangle,kP=28.00,kI=42,kD=4,Last=0;

 }
void loop() 
{
  
  Serial.println(angle);  
  
                 Errorcalc();
                if (abs(Error) <.8){ // prevent integral 'windup'

  pinMode(12,OUTPUT);
  pinMode(11,OUTPUT);
  Wire.begin(2);
  Wire.onReceive(receiveEvent);
  Serial.begin(9600);
  pinMode(13, OUTPUT);
} 
 void Errorcalc()
 {
