Linear Reciprocation With One Way Interrupted Deg. Rotation
Input: blue slider linearly reciprocating.
Output: grey shaft.
When the shaft moves up, it rotates 180 deg. at the upper end of its stroke thanks to orange pins, green movable stopper and red spring.
When moving down the shaft does not rotate at all.
At the lower end of the shaft stroke the orange pins move the stopper horizontally to prepare the stopper for the back 180 deg. rotation of the shaft.
The device for positioning the green stopper (for example spring pin) is not shown.
The orange pins can turn the shaft a little more than 90 deg. only but the red spring helps to get 180 deg. rotation.
Pink pins ensure that the shaft turns 180 deg exactly.