This is the folding wing mechanism developed as part of my Ladybird MOC.
The wings unfold and rotate the in a single action. Each wing is mounted to a small Technic turntable and the drive shaft that controls the flipping movement passes through the turntable.
Outward movement is limited by an axle placed between the two wings, while the flip movement is limited by a 2L half beam connected to the flip drive shaft that stops it from rotating once the wing has flipped over.
Everything is driven by an M motor connected to a worm gear. A 40 tooth gear and 24 tooth clutch gear are connected to each wing, with the clutch gear stopping the mechanism from destroying itself when the wings are fully deployed or retracted.