user45420: I am currently working on an elevator for my examsproject in school. 
It's a quite simple simulation of a lifesize elevator. 
I'm currently using a steppermotor for the elevatorchair and it's set with a certain speed. 
However, in a real elevator, the speed would slowly decrease as it's progressing towards it's destination for a more pleasant ride for the passengers. I'd like to make the same simulation.
I was thinking of using the millis to periodically increase the delays over time, but I don't know whether alternative methods could be used for better results. 

user31105: millis() sound like a good way to go.
Check the estimated time until arrival (stopping), and in steps (you define yourself) you changen the (PWM) speed of the stepper motor.
Note, also for accelerating you can use the same step schema but reversed.
There are other ways, but I think those will be too complicated, like setting a (hardware) timer for the next speed change. Changing the speed in ms-accuracy will be more than enough. 
Do not use delay, since you still want to be responsive for pressed buttons, and (safety) sensors.

45420: <p>I am currently working on an elevator for my examsproject in school. 
It's a quite simple simulation of a lifesize elevator. 
I'm currently using a steppermotor for the elevatorchair and it's set with a certain speed. </p>

<p>However, in a real elevator, the speed would slowly decrease as it's progressing towards it's destination for a more pleasant ride for the passengers. I'd like to make the same simulation.
I was thinking of using the millis to periodically increase the delays over time, but I don't know whether alternative methods could be used for better results. </p>
 31105: <p>millis() sound like a good way to go.</p>

<p>Check the estimated time until arrival (stopping), and in steps (you define yourself) you changen the (PWM) speed of the stepper motor.</p>

<p>Note, also for accelerating you can use the same step schema but reversed.</p>

<p>There are other ways, but I think those will be too complicated, like setting a (hardware) timer for the next speed change. Changing the speed in ms-accuracy will be more than enough. </p>

<p>Do not use delay, since you still want to be responsive for pressed buttons, and (safety) sensors.</p>
