   Serial.print(e_base);
   Serial.println();
   Serial.println();
-
-  //initializes movement queue
-  lastDir.enqueue(0);
-  lastDir.enqueue(0);
-  lastDir.enqueue(0);
-
-  analogWrite(l1_motor, 0);
-  analogWrite(l2_motor, 0);
-  analogWrite(r1_motor, 0);
-  analogWrite(r2_motor, 0);
 }
 
 

      //turns left (west)
      else if (sensorVals[w]*1.2 >= sensorVals[e]*1.2)
      {
        dir[index] = 4;
        if(index == 2 && dir[0] = 4 && dir[1] = 4 && dir[2] = 4)
        {
          analogWrite(l1_motor, 50);
          analogWrite(l2_motor, 0);
          analogWrite(r1_motor, 230);
          analogWrite(r2_motor, 0);
          //lcd.println("head north-west");
          Serial.println("head north-west");
          BT.println("head north-west");
        }
        
      }
      //If east intensity is greater than east intensity, then this means
      //that the BitBeacon signal is coming from north-east

  Serial.println();

  delay(10);
}



//void move()
//Determines movement direction for Bit based on intensity values of each
//sensor. this method has been replaced by the determineDirection() method
// as of Version 0.1.0 and was only used as a test with the north and east
//cardinal points
void move()
{
  printSensors();

  //Check if movement threshold has been reached by any of the sensors.
  if(sensorVals[n] > move_threshold || sensorVals[w] > move_threshold || sensorVals[e] > move_threshold)
  {
    //If north intensity is higher than east intensity, the Bit should move
    //due north.
    if ((sensorVals[n]*.6) > sensorVals[e])
    {
      BT.print("go north");
      Serial.print("go north");
      analogWrite(l1_motor, 255);
      analogWrite(l2_motor, 0);
      analogWrite(r1_motor, 255);
      analogWrite(r2_motor, 0);    
    }
    //If east intensity is higher than north intensity, the Bit should move
    //due east.
    else if ((sensorVals[e]*.6) > sensorVals[n])
    {
      BT.print("go east");
      Serial.print("go east");
      analogWrite(l1_motor, 255);
      analogWrite(l2_motor, 0);
      analogWrite(r1_motor, 0);
      analogWrite(r2_motor, 255);
    }
    //If the north and east intensity ratios are comparable, then Bit should
    //move due north-east. If the ratio of north intensity to east intensity is
    //1, then the intensities are equal. If the ratio is within 0.15 of 1, so
    //either 0.85 and 1.15, then the intensities are comparable and Bit moves
    //due north-east.
    else if (abs(((double)sensorVals[n]/(double)sensorVals[e]) - 1)  < 0.15)
    {
      BT.print("go north-east");
      Serial.print("go north-east");
      analogWrite(l1_motor, 255);
      analogWrite(l2_motor, 0);
      analogWrite(r1_motor, 55);
      analogWrite(r2_motor, 0);
    }
    //If no direction can be determined, move along previously determined path
    else
    {
      //some error
      //continue along previous path 
      BT.print("don't know");
      Serial.print("don't know");
    }
  }
  //if movement threshold has not been reached, Bit will stop
  else
  {
    BT.print("no signal");
    Serial.print("no signal");
    analogWrite(l1_motor, 0);
    analogWrite(l2_motor, 0);
    analogWrite(r1_motor, 0);
    analogWrite(r2_motor, 0);
  }

//  BT.println();
//  BT.println();
//  Serial.println();
//  Serial.println();
}


