Motor Acceleration Timer Deceleration Problem

urthlight:
I am having some trouble getting the following code to work. Any Ideas?

    if (second > time){   // Count over decel motor

Serial.print("Time Out");
      for (int motorspeed = stir_speed; motorspeed >= 0; motorspeed--) {

Assuming stir_speed is a positive number, then motorspeed will always be >0 and your for loop won't do anything. That's why it's not ramping up. Try:

for (motorspeed = stir_speed; motorspeed <= 0; motorspeed--)