I don't understand what you mean with "Also assume that your short term memory is useless". I would like to store if someone call the lift if te lift is already in use.
it's hard to translate that in programming.
Hi, i have an idea on how it will work but it's hard to translate that in programming.So, when I turn on the arduino, i would like a kind of Initialisation. So the lift verify that it's in the bottom of the structure (floor 0 ).
And, from that "point", it's waiting for a call. For example, the lift is at level 0, it's called at floor 2, it speeds up, and when it arrives at level 1,5 it speeds down and stops at floor 2. now, i imagine that the lift is moving, i have absolutely no idea how i can "rember" a push on a button WHILE the motor is turning.
EDIT: I also have to respect the priority. If the guy at floor 1 want to go at Floor 3 and that a guy in floor 2 also want to go to floor 3, so the lift has to stop at floor 2 before going to 3. So I suppose I will have a VAR for the direction of travel
What if it's not at floor 0 when you turn it on?
And one for each position switch and one for each push button and one for each set of doors (to know whether they are open or shut).
Other things to think about are, if the lift is on, say, level 3, is empty and no buttons have been pressed, does it stay there or does it return to level 0? Do the doors stay open or do they close when the lift is inactive?
How can i decrease the speed (PWM) in a loop WHILE I check the buttons?
I have to decrement the speed of the motor at each cycle of the main loop
For the blink without delay, a decrement is used.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16