Gradual increment or decrement boucle for by pressing key <a> or key <s>

//Motor Simulator for car

/*
By controlling an incrementation, I am planing to run faster or slowly a DC motor.
*/

int LEDcontrol=3; // LED on pin # 3
int VoltRead=4; // A voltmeter on pin # 4 (not in the subject)
int commande=(0,DEC); // Use to sand a commande to activate or deactivate boucle for
void setup(){
pinMode(3, OUTPUT); // Configuration of digital port # 3
pinMode(4, INPUT);
Serial.begin(115200);
}

void loop(){
commande=Serial.read(); //Reads a commande of a key
if(Serial.available()==97){ //If is sent, do gradual incrementation on PWM to turn DEL on
do{
for(int i=0; i<=255; i++){
digitalWrite(3,HIGH);
Serial.println(commande);
}
}
while(Serial.read()==commande); //Execute function till the
is pressed
}

commande=Serial.read();
if(Serial.available()==115){ //Reads a commande of a key
do{
for(int i=255; i>=0; i–){ //If is sent, do gradual decrementation on PWM to turn DEL off
digitalWrite(3,HIGH);
Serial.println(commande);
}
}
while(Serial.read()==commande); //Execute function till the is pressed
}

commande=Serial.read();

delay(500);
}

Not sure if this is a question or statement of intent!

I suggest you go and have a look at Arduinoos » Blog Archive » PWM (Part 1) - it explains pwm and shows you how you can change the duty cycle in your code.

I am afraid that your code to read the serial input is very wrong. For instance

if(Serial.available()==97)

will not be true unless you have entered exactly 97 characters, including any line terminators such as line feed or carriage return (or both)
I could go on, but there is so much wrong that it would be tedious. I suggest that you read up on getting data from the serial input (and PWM too)

I also suggest you read up on how to post code in the how to use this forum stick post.

will not be true unless you have entered exactly 97 characters, including any line terminators such as line feed or carriage return (or both)

And, with a 64 byte buffer, it will never hold 97 characters...