Each push makes blue cam shaft turn 180 deg.
Yellow button has prismatic joint with the base.
Violet pin has prismatic joint with the yellow button.
Red spring forces the pin toward the blue cam shaft.
Key factor is different deepths of the cam groove.
Developed cam is shown on the left. Portions in dark blue are deepest.
آی-ویدئو