Input: pink slider linearly reciprocating.
Output: yellow shaft.
When the shaft moves to the right, it rotates 180 deg. at the end of its stroke thanks to the gear-rack drive.
When moving to the left at first the shaft rotates 180 deg. then moves to the initial position without rotation.
The flat portions of the rack prevent the shaft from rotation.
Tops of two end teeth of the rack are cut off for easy meshing start.
آی-ویدئو