Elevator Instructions—Mongoose449

  • up = 0
  • down = 0
  • double = 0
  • buttonone = alert elevator to button one
  • buttontwo = alert elevator to button two
  • button three = alert elevator to button three
  • upbutton = alert elevator to go up
  • downbutton = alert elevator to go down

Step 1: Standby

Move elevator to floor one if no button has been pressed.

Step 2: Check if ‘upbutton’ or ‘downbutton’ has been pressed.

if ‘upbutton’ is pressed:

go to the floor where the button has been pressed, proceed to stage 3

up = 1

if ‘downbutton’ is pressed:

go to the floor where the button has been pressed, proceed to stage 3

down = 1

Step 3

  • Stop on determined floor, open doors.
  • Wait 10 seconds
  • If doorway detects motion, repeat previous action.
  • If no doorway movement, wait 10 seconds, close door.
  • If weight is not detected, move to step 1.
  • If weight is detected, Proceed to step 4
  • Proceed to step 4.

Step 4

Check what floor the elevator is on.

  • If Elevator is on floor ONE, proceed to step 5A
  • If Elevator is on floor TWO, proceed to step 5B
  • If Elevator is on floor THREE, proceed to step 5C

Step 5A

  • Check for button press
  • Repeat until button is pressed
  • If button is ‘buttonone’, repeat stage 3.
  • If button is ‘buttontwo’, move elevator up ONE floor.
  • If button is ‘buttonthree’ move elevator up TWO floors.
  • If ‘buttontwo’ and ‘buttonthree’ are pressed, move up ONE FLOOR. Add 1 to double
  • Proceed to step 6

Step 5B

  • Check for button press
  • Repeat until button is pressed
  • If button is ‘buttontwo’, repeat stage 3.
  • If button is ‘buttonthree’, move elevator up ONE floor.
  • If button is ‘buttonone’ move elevator down ONE floor.
  • If ‘buttonone’ and ‘buttonthree’ are pressed, move up ONE FLOOR. Add 1 to double
  • Proceed to step 6

Step 5C:

  • Check for button press
  • Repeat until button is pressed
  • If button is ‘buttonthree’, repeat stage 3.
  • If button is ‘buttontwo’, move elevator down ONE floor.
  • If button is ‘buttonone’ move elevator down TWO floors.
  • If ‘buttonone’ and ‘buttontwo’ are pressed, move down ONE FLOOR. Add 1 to double
  • Proceed to step 6

Step 6:

  • Open Doors
  • Wait 5 seconds
  • Check if double = 1
  • If double = 1 AND up = 1, move elevator up ONE floor. Remove 1 to double, repeat step 6.
  • If double = 1 AND down = 1, move elevator down ONE floor. Remove 1 to double, repeat step 6.
  • If double = 0, reduce up and down to 0, wait 5 seconds.
  • Proceed to step 7

Step 7:

Check if motion is in door well.

If no motion OR weight in elevator for 15 seconds, close doors, wait 4 minutes, repeat stage 1.

If weight or motion detected, repeat stage 4.

This entry was posted in Elevator Instructions, Mongoose. Bookmark the permalink.

Leave a comment