if (value='w') {
digitalWrite(In1A, LOW);
digitalWrite(In1B, HIGH);
for (int i = 1; i < 100; ++i) {
// increase PWM by 1 unit every 10ms, so we get 100 after 1 second
analogWrite(PWM, i);
delay(10);
}
}
The Arduino won't be able to respond to new received characters during this 1 sec period. You can get round that, but it's more complicated.