   delayMicroseconds(1000);
 }
 
-
 //<---------------CODE TO ACTUATE BUCKET WHEEL---------------->
+int toSteps(int percent){
+  return (percent / 100.0) * FULL_STEPS;
+}
+
 // checks whether we need to actuate the bucket wheel
 // returns false if we are within +/- 3 steps
 bool needsToActuate(int percent){
   int stepsToMove = int(-(toPercent(currentSteps) - percent) / 100.0 * FULL_STEPS);
-  if(stepsToMove <= 3 || stepsToMove >= -3){
+  if(stepsToMove <= 3 && stepsToMove >= -3){
     return false;
   }
   return true; 


// Spins the buketwheel clockwise, then counterclockwise
void unitTestBucketWheelSpin() {
  for (int i = 0; i < 4; ++i)
  {
    driveClockwise(i, BUCKET_SPEED);
  }
  delay(4000);

  for (int i = 0; i < 4; ++i)
  {
    driveCounterclockwise(i, BUCKET_SPEED);
  }

  delay(4000);

  for (int i = 0; i < 4; ++i)
  {
    driveClockwise(i, 0);
  }
  delay(600);
}

// Moves the bucket wheel up and down
void unitTestBucketWheelActuate() {
  moveToPercent(40);
  delay(4000);
  moveToPercent(50);
  delay(600);
}

// Moves the conveyor forwards and backwards

  //unitTestBucketWheelSpin();
  //unitTestBucketWheelActuate();
  //unitTestConveyor();
  //stopMovementMotors();
}

void loop()
