This is the cirquit and code to make the motor turn left and right for a number of fixed steps. This code will make the wings flap once after pressing the button

Needed are: arduino, stepping motor, wires, battery or any other external power supply of 9-12V a pushbutton and a easydriver or a Hbridge.