Input: green chain linearly reciprocating.
Output: grey shaft interruptedly 180 deg. rotating.
This drive with available bicycle freewheel and chain is not costly.
Stroke length of the input L = 3.142 * R
R is radius of the blue wheel rolling circle.
The output may be differs from 180 deg. a little due to ratchet mechanism.