Mechanism for transforming oscillation into rotation