3. Get Position
Position
Even or
Odd ?
Sort array according
to positions
One Motor rotation
Re-assign positions
Calculate number
of rotations
Set direction =
Anticlockwise
Set direction =
Clockwise
Odd Even
Number
of
rotations
= 0 ?
Yes
No
END
4. For each holder in the
system array
Set NewPos =
(NO_HOLDERS*2)+1 -
NewPos
Calculate new positions
NewPos = Old +
(direction*displacement*2)
Position
Even or
Odd ?
Calculate new positions
NewPos = Old -
(direction*displacement*2)
Set NewPos =
(-1*NewPos)+1
NewPos
<= 0
?
NewPos
>
NO_HOL
DERS ?
END
Odd Even
Yes
Yes
No
No
6. B
Start
Is there
any
Saved
cards ?
END
Save holder as empty
Get holder down
Wait for input
number
Install saved cards
NoYes
Remove aligned
holder from user ID
Decrease number of
occupied holders