Input: pink crank rotating continuously.
Output: green ratchet wheel of tooth number Z.
Both go and back motions of yellow ocsillating crank make the wheel rotate in the same direction.
In 1 rev. of the input, the output rotates 2/Z rev. with two dwells.