Moving stepper motor 90 degrees by using a button

Hello, I was wondering if there's a code for moving a stepper motor 90 degrees upward by clicking a button once and 90 degrees downward by clicking the same button twice.

Determine the number of steps your unknown to us stepper motor takes for one full turn and divide by 4. Move that number of steps in whichever direction you want. Just keep in mind steppers can miss/skip steps. So, if accuracy is essential, you'll need a sensor or two to KNOW when it's at a certain angle.

Just my 2 cents

worth more than 2 cents...