 {   
     // 1st pulse is aileron (position 5 on receiver; controlled by Right left/right joystick on transmitter)
     //     used for Steering
-    int aileron = results[RC_TURN];
+    unsigned long aileron = results[RC_TURN];
 //    Serial.print("\tTurn input "); Serial.print(aileron);
     results[RC_TURN] = convertTurn(aileron);
 //    Serial.print("\tTurn Cmd "); Serial.println(results[RC_TURN]);   

// Input is not in brake dead zone
boolean liveBrake(int brake)
{
      return (brake < MIDDLE - DEAD_ZONE);
}

// Emergency stop
void E_Stop()
{
    brake(MAX_BRAKE_OUT);
    moveVehicle(MIN_ACC_OUT);
    delay (2000);   // inhibit output
    // TO DO: disable 36V power
}

//Send values to output pin
void steer(int pos)
{
      analogWrite(STEER_OUT_PIN, pos);
//      Serial.print("\tSteering to: \t"); Serial.print(pos);
     steer_control = pos;
}
void convertBrake(long unsigned *amount)
{
      if (*amount < (MIDDLE + MIN_RC)/2)
          *amount = MAX_BRAKE_OUT;
      else
           *amount = MIN_BRAKE_OUT; 
      brake (*amount);     
}
void brake (int amount)
{
      analogWrite(BRAKE_OUT_PIN, amount);
 //     Serial.print("\tBraking to: \t"); Serial.print(*amount);
      brake_control = amount;
}
/*---------------------------------------------------------------------------------------*/
/* DAC_Write applies value to address, producing an analog voltage.

void Print7 (bool processed, unsigned long results[7])
{ 
    if(processed){
      Serial.println("processed data \t"); 
    }
    else {
      Serial.println("received data \t");
    }

    Serial.print("Turn");     Serial.print("\t");
    Serial.print("Go");     Serial.print("\t");
    Serial.print("EStop");     Serial.print("\t");
    Serial.print("Switch");   Serial.print("\t");
    Serial.println();
    
//    Serial.print(results[0]);     Serial.print("\t");
    Serial.print(results[1]);     Serial.print("\t");
    //Serial.print(results[2]);     Serial.print("\t");
    Serial.print(results[3]);     Serial.print("\t");
    Serial.print(results[4]);     Serial.print("\t");
    Serial.print(results[5]);     Serial.print("\t");
    Serial.println();//Serial.println(results[6]);
}
void LogData(unsigned long commands[7], SerialData *sensors)  // data for spreadsheet
{
