   
   //initialize the variables we're linked to
   Input = 0;
-  Setpoint = 600;
+  Setpoint = 500;
 
   //turn the PID on
   myPID.SetMode(AUTOMATIC);
+  myPID.SetOutputLimits(89, 255);
+  myPID.SetSampleTime(sample_interval-1); // ensure a pid compute for every speed sample
 
   //Serial.println("Begin");
       

  if (millis()>serialTime) {
    SerialReceive();
    SerialSend();
    serialTime+=500;
  }
  


int inputPin=0, outputPin=3;

//Specify the links and initial tuning parameters
PID myPID(&Input, &Output, &Setpoint, 0.2, 0.1, 0.2, DIRECT);
unsigned long serialTime; //this will help us know when to talk with processing

int count =0;
